error400()
error400(\Exception $error) : void
Convenience method to display a 400 series page.
Parameters
\Exception | $error | Exception |
Exception Renderer.
Captures and handles all unhandled exceptions. Displays helpful framework errors when debug > 1. When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown and it is a type that ExceptionHandler does not know about it will be treated as a 500 error.
You can implement application specific exception handling in one of a few ways:
Exception.renderer
This controller method is called instead of the default exception handling. It receives the thrown exception as its only argument. You should implement your error handling in that method.
Using a subclass of YAExceptionRenderer gives you full control over how Exceptions are rendered, you
can configure your class in your core.php, with Configure::write('Exception.renderer', 'MyClass');
You should place any custom exception renderers in app/Lib/Error
.