Datenbankexceptions: SL::X::DBError korrekt ausgeben
[kivitendo-erp.git] / SL / X.pm
1 package SL::X;
2
3 use strict;
4
5 use Exception::Lite qw(declareExceptionClass);
6
7 declareExceptionClass('SL::X::FormError');
8 declareExceptionClass('SL::X::DBError'                         [ '%s', qw(error) ]);
9 declareExceptionClass('SL::X::DBHookError',  'SL::X::DBError', [ '%s hook \'%s\' for object type \'%s\' failed', qw(when hook object_type object) ]);
10 declareExceptionClass('SL::X::DBRoseError',  'SL::X::DBError', [ '\'%s\' in object of type \'%s\' occured', qw(error class) ]);
11 declareExceptionClass('SL::X::DBUtilsError', 'SL::X::DBError', [ '%s: %s', qw(msg error) ]);
12
13 1;