macro failure no longer produces fatal error.

This commit is contained in:
JT Smith 2002-12-15 17:26:41 +00:00
parent 49e5720ba6
commit efd05120e2

View file

@ -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;
} }