File Coverage

blib/lib/Sentry/Stacktrace.pm
Criterion Covered Total %
statement 15 19 78.9
branch 2 2 100.0
condition n/a
subroutine 3 4 75.0
pod 0 2 0.0
total 20 27 74.0


line stmt bran cond sub pod time code
1             use Mojo::Base -base, -signatures;
2 5     5   172150  
  5         18  
  5         28  
3             use Sentry::Stacktrace::Frame;
4 5     5   2788  
  5         11  
  5         29  
5             has exception => undef;
6              
7             has frame_filter => sub {
8             sub {0}
9             };
10              
11             has frames => sub ($self) { return $self->prepare_frames() };
12              
13             if (!$self->exception->can('frames')) {
14 2     2 0 3419 return [];
  2         4  
  2         2  
15 2 100       6 }
16 1         17  
17             my @frames = reverse map { Sentry::Stacktrace::Frame->from_caller($_->@*) }
18             $self->exception->frames->@*;
19 1         23  
  2         27  
20             return [grep { $self->frame_filter->($_) } @frames];
21             }
22 1         11  
  2         11  
23             return { frames => $self->frames };
24             }
25 0     0 0    
  0            
  0            
26 0           1;