-
Notifications
You must be signed in to change notification settings - Fork 2
PairException
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Exceptions\PairException is the base framework exception type.
__construct(string $message, int $code = 0, ?Throwable $previous = null):
- logs tracked message through
Logger - escalates to
CriticalExceptionfor critical error codes (DB connection/config/missing DB objects)
Behavior:
- in production, message is replaced with translated generic error text
- in headless mode -> JSON error response
- in web mode -> modal error notification
throw new \Pair\Exceptions\PairException('Invalid state', \Pair\Exceptions\ErrorCodes::GENERIC_ERROR);Many framework exceptions extend this class and inherit logging/escalation semantics.
See also: AppException, CriticalException, ApiException, AjaxException.