executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
php-error-handlingImplement modern PHP error and exception handling patterns. Use when implementing exception hierarchies, error handlers, or custom exceptions in PHP.
Independent GitHub snapshot · Automated classification · Original documentation governs
See implementation examples for directory layout.
throwing exceptions over returning false or null for error states.RuntimeException or LogicException for domain-specific errors.catch (DomainException | InvalidArgumentException $e).See implementation examples for domain exception hierarchy with multi-catch and finally.
Throwable for both PHP 7/8 Errors and Exceptions.set_exception_handler and set_error_handler for top-level logging and cleanup.finally for resource cleanup (e.g., closing file handles, DB connections).Psr\Log\LoggerInterface for structured error reporting.display_errors=Off and log_errors=On in production php.ini.@ error suppression: Handle or log errors explicitly.display_errors in production: Log to file; never show users.