Skip to content

Create / support some sort of Exception handling code #1

Description

@DavidGoodwin

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions