line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception; |
3
|
21
|
|
|
21
|
|
11958
|
use Devel::StackTrace; |
|
21
|
|
|
|
|
64733
|
|
|
21
|
|
|
|
|
1366
|
|
4
|
|
|
|
|
|
|
use overload |
5
|
21
|
50
|
|
21
|
|
145
|
'""' => sub { return $_[0]->english . ($_[0]->line ? " on line " . $_[0]->line : ''); }; |
|
21
|
|
|
10
|
|
31
|
|
|
21
|
|
|
|
|
162
|
|
|
10
|
|
|
|
|
4816
|
|
6
|
29
|
50
|
33
|
29
|
0
|
8419
|
sub line { return $_[0]->{line} ? (ref($_[0]->{line}) && ref($_[0]->{line}) eq "ARRAY" ? $_[0]->{line}->[0] : $_[0]->{line}) : undef; } |
|
|
50
|
|
|
|
|
|
7
|
8
|
50
|
33
|
8
|
0
|
132
|
sub column { return $_[0]->{line} && ref($_[0]->{line}) && ref($_[0]->{line}) eq "ARRAY" ? $_[0]->{line}->[1] : undef; } |
8
|
0
|
|
|
0
|
0
|
0
|
sub stack { return $_[0]->{stack}; } |
9
|
0
|
0
|
|
0
|
0
|
0
|
sub english { return $_[0]->{error} ? $_[0]->{error} : "Unknown Error"; } |
10
|
|
|
|
|
|
|
|
11
|
21
|
|
|
21
|
|
4040
|
use Devel::StackTrace; |
|
21
|
|
|
|
|
42
|
|
|
21
|
|
|
|
|
546
|
|
12
|
21
|
|
|
21
|
|
126
|
use Scalar::Util qw(blessed); |
|
21
|
|
|
|
|
31
|
|
|
21
|
|
|
|
|
3701
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
10
|
|
|
10
|
0
|
21
|
my ($package, $line, $message) = @_; |
16
|
10
|
|
|
|
|
93
|
my $self = bless { |
17
|
|
|
|
|
|
|
error => $message, |
18
|
|
|
|
|
|
|
stack => Devel::StackTrace->new, |
19
|
|
|
|
|
|
|
}, $package; |
20
|
10
|
50
|
|
|
|
1138
|
if (blessed($line)) { |
21
|
10
|
50
|
100
|
|
|
126
|
if ($line->isa('WWW::Shopify::Liquid::Tag') || $line->isa('WWW::Shopify::Liquid::Token') || $line->isa('WWW::Shopify::Liquid::Operator') || $line->isa('WWW::Shopify::Liquid::Filter')) { |
|
|
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
22
|
10
|
|
|
|
|
747
|
$self->{token} = $line; |
23
|
10
|
|
|
|
|
24
|
$line = $line->{line}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
10
|
|
|
|
|
25
|
$self->{line} = $line; |
27
|
10
|
|
|
|
|
142
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer; |
31
|
21
|
|
|
21
|
|
127
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
21
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
2718
|
|
32
|
0
|
|
|
0
|
|
0
|
sub english { return "Lexer exception"; } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedBrace; |
35
|
21
|
|
|
21
|
|
127
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
21
|
|
|
|
|
38
|
|
|
21
|
|
|
|
|
8011
|
|
36
|
0
|
|
|
0
|
|
0
|
sub english { return "Unbalanced brace found"; } |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser; |
39
|
21
|
|
|
21
|
|
118
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
21
|
|
|
|
|
35
|
|
|
21
|
|
|
|
|
2056
|
|
40
|
0
|
|
|
0
|
|
0
|
sub english { return "Parser exception"; } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NoClose; |
43
|
21
|
|
|
21
|
|
109
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
36
|
|
|
21
|
|
|
|
|
7611
|
|
44
|
2
|
|
|
2
|
|
14
|
sub english { return "Unable to find closing tag for '" . $_[0]->{token}->stringify . "'"; } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::Operands; |
47
|
21
|
|
|
21
|
|
120
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
37
|
|
|
21
|
|
|
|
|
6290
|
|
48
|
2
|
|
|
2
|
|
13
|
sub english { return "All operands inside an expression must be joined by operators, under most conditions"; } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NoOpen; |
51
|
21
|
|
|
21
|
|
152
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
48
|
|
|
21
|
|
|
|
|
6824
|
|
52
|
1
|
|
|
1
|
|
7
|
sub english { return "Unable to find opening tag for '" . $_[0]->{token}->stringify . "'"; } |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::Arguments; |
55
|
21
|
|
|
21
|
|
122
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
29
|
|
|
21
|
|
|
|
|
6410
|
|
56
|
2
|
|
|
2
|
|
19
|
sub english { return "Invalid arguments"; } |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::UnknownTag; |
59
|
21
|
|
|
21
|
|
123
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
35
|
|
|
21
|
|
|
|
|
6994
|
|
60
|
2
|
|
|
2
|
|
9
|
sub english { return "Unknown tag '" . $_[0]->{token}->stringify . "'"; } |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NakedInnerTag; |
63
|
21
|
|
|
21
|
|
119
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
6996
|
|
64
|
1
|
|
|
1
|
|
6
|
sub english { return "Inner tag " . $_[0]->{token}->stringify . " found without enclosing statement"; } |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::UnknownFilter; |
67
|
21
|
|
|
21
|
|
120
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
21
|
|
|
|
|
29
|
|
|
21
|
|
|
|
|
7045
|
|
68
|
0
|
|
|
0
|
|
|
sub english { return "Unknown filter '" . $_[0]->{token}->stringify . "'"; } |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Optimizer; |
71
|
21
|
|
|
21
|
|
130
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
21
|
|
|
|
|
43
|
|
|
21
|
|
|
|
|
2222
|
|
72
|
0
|
|
|
0
|
|
|
sub english { return "Optimizer exception"; } |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer; |
75
|
21
|
|
|
21
|
|
107
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
21
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
1905
|
|
76
|
0
|
|
|
0
|
|
|
sub english { return "Rendering exception"; } |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Unimplemented; |
79
|
21
|
|
|
21
|
|
104
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
21
|
|
|
|
|
36
|
|
|
21
|
|
|
|
|
7521
|
|
80
|
0
|
|
|
0
|
|
|
sub english { return "Unimplemented method"; } |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Arguments; |
83
|
21
|
|
|
21
|
|
121
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
21
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
6474
|
|
84
|
0
|
|
|
0
|
|
|
sub english { return "Wrong type? Number of arguments."; } |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
1; |