X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FX.pm;h=c3533e2efb7fe72ba24788517660e701175e402c;hb=dd5cd96c8b0018f73b6b344b6158bf36c9362898;hp=ce7552c1e14eb3c3b47c3488b380d3ce8e16d8a6;hpb=66ddc388f22a78ff14f7705a0d3d601e81440e04;p=kivitendo-erp.git diff --git a/SL/X.pm b/SL/X.pm index ce7552c1e..c3533e2ef 100644 --- a/SL/X.pm +++ b/SL/X.pm @@ -1,9 +1,45 @@ package SL::X; use strict; +use warnings; -use Exception::Lite qw(declareExceptionClass); +use SL::X::Base; -declareExceptionClass('SL::X::FormError'); +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) ], + defaults => { error_template => [ '\'%s\' in object of type \'%s\' occurred', qw(db_error class) ] }, + }, + 'SL::X::DBUtilsError' => { + isa => 'SL::X::DBError', + }, + 'SL::X::ZUGFeRDValidation' => { + isa => 'SL::X::Base', + }, + 'SL::X::Inventory' => { + isa => 'SL::X::Base', + fields => [ qw(msg error) ], + defaults => { error_template => [ '%s: %s', qw(msg) ] }, + }, + 'SL::X::Inventory::Allocation' => { + isa => 'SL::X::Base', + fields => [ qw(msg error) ], + defaults => { error_template => [ '%s: %s', qw(msg) ] }, + }, +); 1;