i'm new with the try/Catch option in PHP, so i created this:
try {
$dropbox->Delete($_POST['truncNaam']);
} catch (Exception $e) {
echo '<div class="error">Exception: '. $e->getMessage() .'</div>';
}
echo "Success";
When an error occurres now, i will see the error but also i will see " SUCCESS ". I don't want that, i want to see the error when it occurress OR i want to show the SUCCESS if there was no exception.
I just can't figure out how to realize that. Can someone explain it to me?