Download the PHP package tounaf/exception-handler without Composer
On this page you can find all versions of the php package tounaf/exception-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tounaf/exception-handler
More information about tounaf/exception-handler
Files in tounaf/exception-handler
Download tounaf/exception-handler
More information about tounaf/exception-handler
Files in tounaf/exception-handler
Vendor tounaf
Package exception-handler
Short Description Exception handler for symfony project
License MIT
Package exception-handler
Short Description Exception handler for symfony project
License MIT
Please rate this library. Is it a good library?
Informations about the package exception-handler
Create handler class for each exception that you throw in your application.
1 - Installation
2 - Features
this package allows to separate the handler class by exception to avoid code coupling :
- One classe handler is responsible for exception
- Render response throught different output (html, json, xml)
- Decorate classe handler for other needs (Write to log file, send exception to mail, to sentry)
3 - Create Exception Handler class
Create an class and implement the ExceptionHandlerInteface interface. It contains two methods:
** handleException: This method have Throwble as argument and returns a Symfony Response
** supportsException: This method have Throwble as argument and return boolean.
Example:
First create Exception to handle through the app.
Then create the handler that handle this exception
When MyException is thrown, the MyExceptionHandler class is called by the system . For example:
All versions of exception-handler with dependencies
PHP Build Version
Package Version
Requires
symfony/http-foundation Version
6.4.* || 6.3.* || 6.2.* || 6.1.* || 5.4.* || 4.4.*
symfony/error-handler Version ^7.1 || 6.4.* || 5.4.* || 4.4.*
symfony/error-handler Version ^7.1 || 6.4.* || 5.4.* || 4.4.*
The package tounaf/exception-handler contains the following files
Loading the files please wait ....