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   174901  
  5         20  
  5         29  
3             use Sentry::Stacktrace::Frame;
4 5     5   2838  
  5         13  
  5         31  
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 3438 return [];
  2         3  
  2         3  
15 2 100       6 }
16 1         17  
17             my @frames = reverse map { Sentry::Stacktrace::Frame->from_caller($_->@*) }
18             $self->exception->frames->@*;
19 1         15  
  2         28  
20             return [grep { $self->frame_filter->($_) } @frames];
21             }
22 1         31  
  2         11  
23             return { frames => $self->frames };
24             }
25 0     0 0    
  0            
  0            
26 0           1;