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

[9.x] Allow passing closure to rescue $report parameter #44710

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

foremtehan
Copy link
Contributor

@foremtehan foremtehan commented Oct 24, 2022

Allow closures to be pass in rescue function for $report paramter so we can conditionally report the error base on the exception type or etc ... (if accepted i'll add tests later)

rescue(fn() => 'error', fn() => 'rescue', function(Throwable $e){
    return $e instanceof SomeException;
});

@foremtehan foremtehan changed the title [9.x] Allow passing closure to rescure report parameter [9.x] Allow passing closure to rescue report parameter Oct 24, 2022
@foremtehan foremtehan changed the title [9.x] Allow passing closure to rescue report parameter [9.x] Allow passing closure to rescue $report parameter Oct 24, 2022
@taylorotwell taylorotwell merged commit cea7ba0 into laravel:9.x Oct 24, 2022
@foremtehan foremtehan deleted the patch-8 branch October 24, 2022 13:27
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