X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/27ffa16a85221662dee49da0f210312383341240..a5a81f46c232cbbc19ee1024194ff339708d22e1:/SL/X.pm diff --git a/SL/X.pm b/SL/X.pm index ce7552c1e..756793b90 100644 --- a/SL/X.pm +++ b/SL/X.pm @@ -1,9 +1,32 @@ 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\' occured', qw(db_error class) ] }, + }, + 'SL::X::DBUtilsError' => { + isa => 'SL::X::DBError', + }, +); 1;