axy/errors
axy/errors is a PHP 8.1+ helper for defining and organizing exception classes. Provides common exception structures, basic error classes, default messages, backtrace truncation, and global options to standardize error handling across projects.
Opts: the global optionsThe class axy\errors\Opts allows you to globally configure the follow options:
howTruncateTracetruncateNativeTraceSince PHP 7 truncate native trace is not supported.
Setters:
Opts::setHowTruncateTrace(mixed)Opts::setTruncateNativeTrace(bool)Getters:
Opts::getHowTruncateTrace():mixedOpts::getTruncateNativeTrace():boolGlobal settings and static method it is usually bad. But since it does not affect the functionality, but only on debug information then it is acceptable.
Overriding properties as howTruncateTrace and truncateNativeTrace affects only the classes themselves and their children.
Setting values using Opts has an effect on all classes (except where overridden).
How can I help you explore Laravel packages today?