Skip to content

Add support for error and exception filtering#23

Merged
rubenvanassche merged 3 commits into
masterfrom
error-and-exception-filtering
Apr 30, 2021
Merged

Add support for error and exception filtering#23
rubenvanassche merged 3 commits into
masterfrom
error-and-exception-filtering

Conversation

@rubenvanassche
Copy link
Copy Markdown
Contributor

  • Filter PHP errors by their level, for example: E_ALL & ~E_NOTICE
  • FIlter exceptions via a callable

Can also be used within a Laravel install!

For errors:

Flare::reportErrorLevels(E_ALL & ~E_USER_NOTICE);

For exceptions:

Flare::filterExceptionsUsing(fn(Throwable $throwable) => false);

By default, these filters are disabled.

@rubenvanassche rubenvanassche merged commit 78ce6bb into master Apr 30, 2021
@rubenvanassche rubenvanassche deleted the error-and-exception-filtering branch April 30, 2021 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants