X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FObject%2FHooks.pm;h=371e4450e4198133ccdd7990664d37aa5c72b04a;hb=6418adee39dc8d7331df12b716096f0a8611ef5d;hp=e47951407643ab3be12d52d9796ef500da150279;hpb=5fd2cf413e611047a3b8d667378a258a7955941e;p=kivitendo-erp.git diff --git a/SL/DB/Object/Hooks.pm b/SL/DB/Object/Hooks.pm index e47951407..371e4450e 100644 --- a/SL/DB/Object/Hooks.pm +++ b/SL/DB/Object/Hooks.pm @@ -44,11 +44,11 @@ sub run_hooks { foreach my $sub (@{ ( $hooks{$when} || { })->{ ref($object) } || [ ] }) { my $result = ref($sub) eq 'CODE' ? $sub->($object, @args) : $object->call_sub($sub, @args); - die SL::X::DBHookError->new( - hook => (ref($sub) eq 'CODE' ? '' : $sub), - when => $when, - object => $object, - ) if !$result; + die SL::X::DBHookError->new(when => $when, + hook => (ref($sub) eq 'CODE' ? '' : $sub), + object => $object, + object_type => ref($object)) + if !$result; } } @@ -122,8 +122,8 @@ C function names above. An exception of C is thrown if any of the hooks returns a falsish value. -This function is supposed to be called by L, -L or L. +This function is supposed to be called by L, +L or L. =back