Download the PHP package prestashop/module-lib-error-handler without Composer
On this page you can find all versions of the php package prestashop/module-lib-error-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prestashop/module-lib-error-handler
More information about prestashop/module-lib-error-handler
Files in prestashop/module-lib-error-handler
Package module-lib-error-handler
Short Description Automatically send module exceptions to sentry
License AFL-3.0
Homepage https://github.com/PrestaShopCorp/module-lib-error-handler
Informations about the package module-lib-error-handler
PrestaShop Sentry Error handler for Modules
This repository includes sentry lib with handler that you can use in your PrestaShop Module to catch errors and send it to sentry.
Pre-requisites
You should install this library only on a PrestaShop environment and with PHP 7.1.3 minimum.
Installation
Usage
-
To catch all unhandled exceptions in the module you need to init error handler in your main class :
-
If you want to add custom settings like tags, user and level you should create your own ErrorHandler and extend \PrestaShop\Sentry\Handler\ErrorHandler :
-
You can also send exceptions if you catch them by using sentry handle :
- There are also extra function that sets default module tags to sentry :
All versions of module-lib-error-handler with dependencies
sentry/sentry Version ^2.5
php-http/curl-client Version ^2.2
symfony/http-client Version ^4.3|^5.0
http-interop/http-factory-guzzle Version ^1.1