projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37f3d6c
)
Richtiges Handling des Fehlerfalls von eval
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 12 Jan 2011 14:10:56 +0000
(15:10 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Wed, 12 Jan 2011 15:06:48 +0000
(16:06 +0100)
SL/DB/BackgroundJob.pm
patch
|
blob
|
history
diff --git
a/SL/DB/BackgroundJob.pm
b/SL/DB/BackgroundJob.pm
index
b9e00c4
..
8945ceb
100644
(file)
--- a/
SL/DB/BackgroundJob.pm
+++ b/
SL/DB/BackgroundJob.pm
@@
-27,7
+27,7
@@
sub run {
my $run_at = DateTime->now_local;
my $history;
- eval {
+
my $ok =
eval {
my $result = $package->new->run($self);
$history = SL::DB::BackgroundJobHistory
@@
-41,7
+41,7
@@
sub run {
1;
};
- if (
$EVAL_ERROR
) {
+ if (
!$ok
) {
$history = SL::DB::BackgroundJobHistory
->new(package_name => $self->package_name,
run_at => $run_at,