Extend the exception test.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
4267bb2f26
commit
3715b1b53d
|
@ -20,6 +20,11 @@ class Program {
|
||||||
ExceptionHandler::handleException($e);
|
ExceptionHandler::handleException($e);
|
||||||
};
|
};
|
||||||
set_exception_handler($handler);
|
set_exception_handler($handler);
|
||||||
|
try {
|
||||||
|
print("Called try block 0\n");
|
||||||
|
} finally {
|
||||||
|
print("Called finally block 0\n");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
throw new NewException("Catch me once", 1);
|
throw new NewException("Catch me once", 1);
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
|
@ -27,9 +32,12 @@ class Program {
|
||||||
} finally {
|
} finally {
|
||||||
print("Called finally block 1\n");
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
|
Called try block 0
|
||||||
|
Called finally block 0
|
||||||
Uncaught NewException, code: 1
|
Uncaught NewException, code: 1
|
||||||
Message: Catch me once
|
Message: Catch me once
|
||||||
Called finally block 1
|
Called finally block 1
|
||||||
Uncaught Exception, code: 2
|
Called finally block 2
|
||||||
|
Uncaught NewException, code: 2
|
||||||
Message: Catch me twice
|
Message: Catch me twice
|
||||||
|
Uncaught Exception, code: 3
|
||||||
|
Message: Catch me thrice
|
Loading…
Reference in New Issue