| 1 | package Sentry::Integration::DieHandler; | ||
| 2 | use Mojo::Base -base, -signatures; | ||
| 3 | |||
| 4 | use Mojo::Exception; | ||
| 5 | |||
| 6 | sub setup_once ($self, $add_global_event_processor, $get_current_hub) { | ||
| 7 | ## no critic (Variables::RequireLocalizedPunctuationVars) | ||
| 8 | $SIG{__DIE__} = sub { | ||
| 9 | ref $_[0] ? CORE::die $_[0] : Mojo::Exception->throw(shift); | ||
| 10 | # ref $_[0] ? CORE::die $_[0] : Mojo::Exception->new(shift)->trace; | ||
| 11 | }; | ||
| 12 | } | ||
| 13 | |||
| 14 | 1; |