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

ref: Expose the ExceptionMechanism through the event hint #1416

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Conversation

cleptric
Copy link
Member

@cleptric cleptric commented Oct 24, 2022

This makes it possible to access the handled property when reporting errors to Sentry.
While this approach is definitely not the best solution, I didn't find a better way without breaking BC.

$hint = EventHint::fromArray([
    'exception' => $exception,
    'mechanism' => new ExceptionMechanism(ExceptionMechanism::TYPE_GENERIC, false),
]);

captureEvent(Event::createEvent(), $hint);

Remaining ToDos

  • Add more tests

Closes #1350

@cleptric cleptric added this to the 3.11 milestone Oct 24, 2022
@cleptric cleptric self-assigned this Oct 24, 2022
@cleptric cleptric changed the title [WIP] ref: Expose the ExceptionMechanism through the event hint ref: Expose the ExceptionMechanism through the event hint Oct 24, 2022
@cleptric cleptric marked this pull request as ready for review October 24, 2022 14:27
@cleptric cleptric requested a review from stayallive October 24, 2022 14:28
@cleptric cleptric force-pushed the event-hint branch 2 times, most recently from fdcc34c to a1bb014 Compare October 24, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants