v3.1
Functionality
clear handler hierarchy based on the exception's class and code
Handler::handleException
now tries registered exception handlers in the following order:
- try handlers for concrete exception class + code
- try handlers for concrete exception class catch-all
- try handlers for parent exception class catch-all; iterate up inheritance chain
- try handlers for
Throwable
Notes:
- When a handler returns true, no further handlers will be tried.
- Within each step, handlers will be tried in the order they were added.
- A "catch-all" handler is one set to handle code
0
.
Previously, invocation order for exception handlers was considered undefined, so this should have no/minimal backwards compatibility impact.
Tests
- added a few more tests
Documentation Fixes
- corrected readme example