Code: Select all
$ex = catch {
// some code that might thrown an exception.
while (...) {
// code in the while loop that could cause an exception, ending the loop.
$ex = catch {
// code that should not end the while loop
}
// inner error handler (the loop could continue in the event of a not so exceptional exception)
} // end of while loop
}
// The outer error handler. Catch exceptions that should end the while loop.