kivitendo/SL/X.pm @ 912e5eff
27ffa16a | Moritz Bunkus | package SL::X;
|
||
use strict;
|
||||
6bdcd838 | Moritz Bunkus | use warnings;
|
||
27ffa16a | Moritz Bunkus | |||
6bdcd838 | Moritz Bunkus | use SL::X::Base;
|
||
27ffa16a | Moritz Bunkus | |||
cb53cdd0 | Sven Schöling | |||
# note! the default fields "message", "error" and "show_trace" are created by
|
||||
# Exception::Class if message or error are given, they are used for
|
||||
# stringification, so don't use them in error_templates
|
||||
#
|
||||
6bdcd838 | Moritz Bunkus | use Exception::Class (
|
||
'SL::X::FormError' => {
|
||||
isa => 'SL::X::Base',
|
||||
},
|
||||
'SL::X::DBError' => {
|
||||
isa => 'SL::X::Base',
|
||||
fields => [ qw(msg db_error) ],
|
||||
defaults => { error_template => [ '%s: %s', qw(msg db_error) ] },
|
||||
},
|
||||
'SL::X::DBHookError' => {
|
||||
isa => 'SL::X::DBError',
|
||||
fields => [ qw(when hook object object_type) ],
|
||||
defaults => { error_template => [ '%s hook \'%s\' for object type \'%s\' failed', qw(when hook object_type object) ] },
|
||||
},
|
||||
'SL::X::DBRoseError' => {
|
||||
isa => 'SL::X::DBError',
|
||||
fields => [ qw(class metaobject object) ],
|
||||
37f2ab4d | Geoffrey Richardson | defaults => { error_template => [ '\'%s\' in object of type \'%s\' occurred', qw(db_error class) ] },
|
||
6bdcd838 | Moritz Bunkus | },
|
||
'SL::X::DBUtilsError' => {
|
||||
isa => 'SL::X::DBError',
|
||||
},
|
||||
333003d3 | Moritz Bunkus | 'SL::X::ZUGFeRDValidation' => {
|
||
isa => 'SL::X::Base',
|
||||
},
|
||||
9687d2ce | Sven Schöling | 'SL::X::Inventory' => {
|
||
isa => 'SL::X::Base',
|
||||
cb53cdd0 | Sven Schöling | fields => [ qw(code) ],
|
||
9687d2ce | Sven Schöling | },
|
||
'SL::X::Inventory::Allocation' => {
|
||||
isa => 'SL::X::Base',
|
||||
cb53cdd0 | Sven Schöling | fields => [ qw(code) ],
|
||
9687d2ce | Sven Schöling | },
|
||
6bdcd838 | Moritz Bunkus | );
|
||
27ffa16a | Moritz Bunkus | |||
1;
|