[open-ils-commits] r11990 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 26 21:23:19 EST 2009
Author: miker
Date: 2009-01-26 21:23:18 -0500 (Mon, 26 Jan 2009)
New Revision: 11990
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
for now use die instead of throw
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2009-01-27 02:21:33 UTC (rev 11989)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2009-01-27 02:23:18 UTC (rev 11990)
@@ -27,7 +27,7 @@
my $self = shift;
if (defined $self->reacted) {
- $self->update_state( 'cleaning') || throw 'Unable to update event state';
+ $self->update_state( 'cleaning') || die 'Unable to update event state';
try {
my $cleanup = $self->reacted ? $self->definition->cleanup_success : $self->definition->cleanup_failure;
$self->cleanedup(
@@ -38,13 +38,13 @@
);
} otherwise {
$log->error( shift() );
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
};
if ($self->cleanedup) {
- $self->update_state( 'complete' ) || throw 'Unable to update event state';
+ $self->update_state( 'complete' ) || die 'Unable to update event state';
} else {
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
}
} else {
@@ -60,7 +60,7 @@
if ($self->definition->group_field) { # can't react individually to a grouped definition
$self->{reacted} = undef;
} else {
- $self->update_state( 'reacting') || throw 'Unable to update event state';
+ $self->update_state( 'reacting') || die 'Unable to update event state';
try {
$self->reacted(
OpenILS::Application::Trigger::ModRunner
@@ -70,13 +70,13 @@
);
} otherwise {
$log->error( shift() );
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
};
if (defined $self->reacted) {
- $self->update_state( 'reacted' ) || throw 'Unable to update event state';
+ $self->update_state( 'reacted' ) || die 'Unable to update event state';
} else {
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
}
}
} else {
@@ -91,7 +91,7 @@
return $self if (defined $self->valid);
if ($self->build_environment->environment->{complete}) {
- $self->update_state( 'validating') || throw 'Unable to update event state';
+ $self->update_state( 'validating') || die 'Unable to update event state';
try {
$self->valid(
OpenILS::Application::Trigger::ModRunner
@@ -101,17 +101,17 @@
);
} otherwise {
$log->error( shift() );
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
};
if (defined $self->valid) {
if ($self->valid) {
- $self->update_state( 'valid' ) || throw 'Unable to update event state';
+ $self->update_state( 'valid' ) || die 'Unable to update event state';
} else {
- $self->update_state( 'invalid' ) || throw 'Unable to update event state';
+ $self->update_state( 'invalid' ) || die 'Unable to update event state';
}
} else {
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
}
} else {
$self->{valid} = undef
@@ -220,7 +220,7 @@
my $self = shift;
return $self if ($self->environment->{complete});
- $self->update_state( 'collecting') || throw 'Unable to update event state';
+ $self->update_state( 'collecting') || die 'Unable to update event state';
try {
$self->definition( $self->editor->retrieve_action_trigger_event_definition( $self->event->event_def ) );
@@ -259,13 +259,13 @@
$self->environment->{complete} = 1;
} otherwise {
$log->error( shift() );
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
};
- if ($self->environment->{complete})
- $self->update_state( 'collected' ) || throw 'Unable to update event state';
+ if ($self->environment->{complete}) {
+ $self->update_state( 'collected' ) || die 'Unable to update event state';
} else {
- $self->update_state( 'error' ) || throw 'Unable to update event state';
+ $self->update_state( 'error' ) || die 'Unable to update event state';
}
return $self;
More information about the open-ils-commits
mailing list