samsonasik / ErrorHeroModule

:gem: A Hero for your Zend Framework/Laminas, and Expressive/Mezzio application to log ( DB and Mail ) and handle php errors & exceptions during Mvc process/between request and response
MIT License
50 stars 6 forks source link

added ability to exclude specific PHP E_* error and Exception with only for specific message provided #72

Closed samsonasik closed 4 years ago

samsonasik commented 4 years ago

to make it possible to exclude only with specific message, eg:

// excluded php errors ( http://www.php.net/manual/en/errorfunc.constants.php )
'exclude-php-errors' => [

    // can be specific error
    \E_USER_DEPRECATED,

    // can be specific error with specific message
    [\E_WARNING, 'specific error message'],

],

// excluded exceptions
'exclude-exceptions' => [

    // can be an Exception class or class extends Exception class
    \App\Exception\MyException::class,

    // can be specific exception with specific message
    [\RuntimeException::class, 'specific exception message'],

    // or specific Error class with specific message
    [\Error::class, 'specific error message'],

],