Repository navigation
AppException
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Exceptions\AppException is intended for front-end web application errors.
It extends PairException and triggers user-facing notifications.
__construct(string $message, int $code = 0, ?Throwable $previous = null):
- for
CSRF_TOKEN_INVALID, shows a modal prompting page reload - otherwise triggers generic front-end error notification via
PairException::frontEnd() - logs via parent exception behavior
use Pair\Exceptions\AppException;
use Pair\Exceptions\ErrorCodes;
if (!$isValidCsrf) {
throw new AppException('Invalid CSRF token', ErrorCodes::CSRF_TOKEN_INVALID);
}See also: PairException, CriticalException, ErrorCodes.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4