macro failure no longer produces fatal error.
This commit is contained in:
parent
49e5720ba6
commit
efd05120e2
1 changed files with 7 additions and 3 deletions
|
|
@ -83,12 +83,16 @@ sub getParams {
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub process {
|
sub process {
|
||||||
my ($macro, $cmd, $output);
|
my ($macro, $cmd, $output, $temp);
|
||||||
$output = $_[0];
|
$output = $_[0];
|
||||||
foreach $macro (keys %{$session{macro}}) {
|
foreach $macro (keys %{$session{macro}}) {
|
||||||
$cmd = "WebGUI::Macro::".$macro."::process";
|
$cmd = "WebGUI::Macro::".$macro."::process";
|
||||||
$output = eval{&$cmd($output)};
|
$temp = eval{&$cmd($output)};
|
||||||
WebGUI::ErrorHandler::fatalError("Processing failed on macro: $macro: ".$@) if($@);
|
if ($@) {
|
||||||
|
WebGUI::ErrorHandler::warn("Processing failed on macro: $macro: ".$@);
|
||||||
|
} else {
|
||||||
|
$output = $temp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue