Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create / support some sort of Exception handling code #1

Open
DavidGoodwin opened this issue Nov 23, 2020 · 0 comments
Open

Create / support some sort of Exception handling code #1

DavidGoodwin opened this issue Nov 23, 2020 · 0 comments

Comments

@DavidGoodwin
Copy link
Owner

So if the adapter throws an exception, we default to some sort of set behaviour

See also :
https://github.com/Seldaek/monolog/blob/39637a5d0e98068d98189ce48a87f3dd61455429/src/Monolog/Logger.php#L453

function $somethingCallable = function(\Exception $e) : bool {
     error_log($e);

     // some clever logic here....

     return true; // return true so e.g. $rateLimit->check(...) returns true even if an exception occurred.
}

$rateLimit->setExceptionHandler($somethingCallable);
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

No branches or pull requests

1 participant