Reworked error handling to propogate errors downward, especially when webgui.debug is set
This commit is contained in:
parent
b815228a1b
commit
e945a94c63
12 changed files with 132 additions and 110 deletions
|
|
@ -198,12 +198,11 @@ sub callMethod {
|
|||
}
|
||||
|
||||
#Try to call the method
|
||||
my $output = eval { $self->$method(@{$args}) };
|
||||
|
||||
#Croak on error
|
||||
if($@) {
|
||||
croak "Unable to run $method on $module: $@";
|
||||
return undef;
|
||||
my $output = eval { $self->$method(@{$args}); };
|
||||
if( $@ ) {
|
||||
my $e = WebGUI::Error->caught;
|
||||
$e->{message} = "Unable to run $method on $module: $e->{message}";
|
||||
$e->rethrow;
|
||||
}
|
||||
|
||||
#Return the output from the method call
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue