Extend the exception test.
All checks were successful
The build was successful.

This commit is contained in:
2019-06-05 08:23:13 +02:00
parent 4267bb2f26
commit 3715b1b53d
2 changed files with 17 additions and 4 deletions

View File

@@ -20,6 +20,11 @@ class Program {
ExceptionHandler::handleException($e);
};
set_exception_handler($handler);
try {
print("Called try block 0\n");
} finally {
print("Called finally block 0\n");
}
try {
throw new NewException("Catch me once", 1);
} catch(Exception $e) {
@@ -27,9 +32,12 @@ class Program {
} finally {
print("Called finally block 1\n");
}
throw new Exception("Catch me twice", 2);
try {
throw new NewException("Catch me twice", 2);
} finally {
print("Called finally block 2\n");
}
throw new Exception("Catch me thrice", 3);
}
}