php-error-handling

Installation
SKILL.md

PHP Error Handling

Priority: P0 (CRITICAL)

Structure

See implementation examples for directory layout.

Build Exception Hierarchies

  • Exception-Driven: Favor throwing exceptions over returning false or null for error states.
  • Custom Exceptions: Extend RuntimeException or LogicException for domain-specific errors.
  • Multi-Catch: Use Union types in catch blocks: catch (DomainException | InvalidArgumentException $e).

See implementation examples for domain exception hierarchy with multi-catch and finally.

Configure Global Error Handling

Installs
1
GitHub Stars
521
First Seen
12 days ago
php-error-handling — hoangnguyen0403/agent-skills-standard