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
sub process {
my ($macro, $cmd, $output);
my ($macro, $cmd, $output, $temp);
$output = $_[0];
foreach $macro (keys %{$session{macro}}) {
$cmd = "WebGUI::Macro::".$macro."::process";
$output = eval{&$cmd($output)};
WebGUI::ErrorHandler::fatalError("Processing failed on macro: $macro: ".$@) if($@);
$temp = eval{&$cmd($output)};
if ($@) {
WebGUI::ErrorHandler::warn("Processing failed on macro: $macro: ".$@);
} else {
$output = $temp;
}
}
return $output;
}