Dhii - Exception
Standards-compliant exception classes.
Details
This package contains concrete implementations of classes that implement
interfaces in dhii/exception-interface. This provides developers with
ready-made, standards-compliant classes that can be safely instantiated and
thrown to signal the various errors. The concrete exceptions will usually
have a corresponding factory trait, and the factory methods of those traits
are the recommended way of creating new exception instances (after service
definition, of course).
Implementations in this package also have the following features aimed to become more standards-compliant:
- A stringable is accepted everywhere, where a string can be passed.
- All parameters can be passed
nullto signal default value (which may be notnull).
Consumers, i.e. code that attempts to catch, should not depend on these
classes. Instead, consumers should depend on the interfaces of
dhii/exception-interface.