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
 
  13 use Exception::Class (
 
  14   'SL::X::FormError'    => {
 
  19     fields              => [ qw(msg db_error) ],
 
  20     defaults            => { error_template => [ '%s: %s', qw(msg db_error) ] },
 
  22   'SL::X::DBHookError'  => {
 
  23     isa                 => 'SL::X::DBError',
 
  24     fields              => [ qw(when hook object object_type) ],
 
  25     defaults            => { error_template => [ '%s hook \'%s\' for object type \'%s\' failed', qw(when hook object_type object) ] },
 
  27   'SL::X::DBRoseError'  => {
 
  28     isa                 => 'SL::X::DBError',
 
  29     fields              => [ qw(class metaobject object) ],
 
  30     defaults            => { error_template => [ '\'%s\' in object of type \'%s\' occurred', qw(db_error class) ] },
 
  32   'SL::X::DBUtilsError' => {
 
  33     isa                 => 'SL::X::DBError',
 
  35   'SL::X::ZUGFeRDValidation' => {
 
  38   'SL::X::Inventory' => {
 
  40     fields              => [ qw(code) ],
 
  42   'SL::X::Inventory::Allocation' => {
 
  44     fields              => [ qw(code) ],