Skip to content

Commit d8c9b1f

Browse files
committed
Seems UPGRADING is not merged...
1 parent 4fb3627 commit d8c9b1f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

UPGRADING

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -323,21 +323,21 @@ Relevant RFCs:
323323
Changes to error handling
324324
-------------------------
325325

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.
329329

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.
333333

334334
For the recoverable fatal errors which have been converted into an exception,
335335
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.
337337

338-
* Parser errors now generate a ParseException (extends BaseException). Error
338+
* Parser errors now generate a ParseError that extends Error. Error
339339
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()
341341
based handling.
342342

343343
* Constructors of internal classes will now always throw an exception on
@@ -347,6 +347,7 @@ Changes to error handling
347347

348348
Relevant RFCs:
349349
* https://wiki.php.net/rfc/engine_exceptions_for_php7
350+
* https://wiki.php.net/rfc/throwable-interface
350351
* https://wiki.php.net/rfc/internal_constructor_behaviour
351352
* https://wiki.php.net/rfc/reclassify_e_strict
352353

0 commit comments

Comments
 (0)