Skip to content

Correctly mark unhandled exceptions as handled: false #607

@cleptric

Description

@cleptric

We exposed the ExceptionMechanism via the EventHint, so we can now correctly set the handled property in the SDK's error handler.

Replace all calls to captureException() with

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

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

getsentry/sentry-php#1416

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions