Revision cb53cdd0
Von Sven Schöling vor fast 3 Jahren hinzugefügt
SL/X.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use SL::X::Base; |
7 | 7 |
|
8 |
|
|
9 |
# note! the default fields "message", "error" and "show_trace" are created by |
|
10 |
# Exception::Class if message or error are given, they are used for |
|
11 |
# stringification, so don't use them in error_templates |
|
12 |
# |
|
8 | 13 |
use Exception::Class ( |
9 | 14 |
'SL::X::FormError' => { |
10 | 15 |
isa => 'SL::X::Base', |
... | ... | |
32 | 37 |
}, |
33 | 38 |
'SL::X::Inventory' => { |
34 | 39 |
isa => 'SL::X::Base', |
35 |
fields => [ qw(msg error) ], |
|
36 |
defaults => { error_template => [ '%s: %s', qw(msg) ] }, |
|
40 |
fields => [ qw(code) ], |
|
37 | 41 |
}, |
38 | 42 |
'SL::X::Inventory::Allocation' => { |
39 | 43 |
isa => 'SL::X::Base', |
40 |
fields => [ qw(msg error) ], |
|
41 |
defaults => { error_template => [ '%s: %s', qw(msg) ] }, |
|
44 |
fields => [ qw(code) ], |
|
42 | 45 |
}, |
43 | 46 |
); |
44 | 47 |
|
Auch abrufbar als: Unified diff
Inventory: Exception Klassen korrigiert
Exception::Class behandelt message und error speziell, und dadurch
gingen im portierten Inventory Helper feature die exceptions kaputt.
In SL::X ist jetzt ein Kommentar der das beschreibt.