public function ExceptionHandler::setHandler in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/debug/ExceptionHandler.php \Symfony\Component\Debug\ExceptionHandler::setHandler()
Sets a user exception handler.
Parameters
callable $handler An handler that will be called on Exception:
Return value
callable|null The previous exception handler if any
File
- vendor/
symfony/ debug/ ExceptionHandler.php, line 81
Class
- ExceptionHandler
- ExceptionHandler converts an exception to a Response object.
Namespace
Symfony\Component\DebugCode
public function setHandler($handler) {
if (null !== $handler && !is_callable($handler)) {
throw new \LogicException('The exception handler must be a valid PHP callable.');
}
$old = $this->handler;
$this->handler = $handler;
return $old;
}