Catch Throwable when a boundary must handle both PHP Error instances and Exception instances: ~~~php try { $result = $handler->run(); } catch (Throwable $error) { $logger->error('Operation failed', ['exception' => $error]); throw $error; } ~~~ Use narrower exception catches when possible, never suppress the failure silently, and reserve recovery for errors the application can safely handle.
Installs into .claude/skills of the current project.
Are you the author of Php Error Handling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-php-error-handling-4b65fa91)
Catch Throwable when a boundary must handle both PHP Error instances and Exception instances:
~~~php
try {
$result = $handler->run();
} catch (Throwable $error) {
$logger->error('Operation failed', ['exception' => $error]);
throw $error;
}
~~~
Use narrower exception catches when possible, never suppress the failure silently, and reserve recovery for errors the application can safely handle.