@@ -323,21 +323,21 @@ Relevant RFCs:
323
323
Changes to error handling
324
324
-------------------------
325
325
326
- * The new base class of the exception hierarchy is BaseException, from which
327
- Exception extends. Typehints in exception handling code may need to be changed
328
- to account for this.
326
+ * There are now two exception classes: Exception and Error. Both classes
327
+ implement a new interface Throwable. Type hints in exception handling code
328
+ may need to be changed to account for this.
329
329
330
- * Some fatal errors and recoverable fatal errors now throw an EngineException
331
- instead. As EngineException extends BaseException but not Exception, these
332
- exceptions will not caught by existing try/catch blocks.
330
+ * Some fatal errors and recoverable fatal errors now throw an Error instead.
331
+ As Error is a separate class from Exception, these exceptions will not be
332
+ caught by existing try/catch blocks.
333
333
334
334
For the recoverable fatal errors which have been converted into an exception,
335
335
it is no longer possible to silently ignore the error from an error handler.
336
- In particular, it is no longer possible to ignore typehint failures.
336
+ In particular, it is no longer possible to ignore type hint failures.
337
337
338
- * Parser errors now generate a ParseException ( extends BaseException) . Error
338
+ * Parser errors now generate a ParseError that extends Error . Error
339
339
handling for eval()s on potentially invalid code should be changed to catch
340
- ParseException in addition to the previous return value / error_get_last()
340
+ ParseError in addition to the previous return value / error_get_last()
341
341
based handling.
342
342
343
343
* Constructors of internal classes will now always throw an exception on
@@ -347,6 +347,7 @@ Changes to error handling
347
347
348
348
Relevant RFCs:
349
349
* https://wiki.php.net/rfc/engine_exceptions_for_php7
350
+ * https://wiki.php.net/rfc/throwable-interface
350
351
* https://wiki.php.net/rfc/internal_constructor_behaviour
351
352
* https://wiki.php.net/rfc/reclassify_e_strict
352
353
0 commit comments