--- loncom/xml/run.pm 2001/12/11 15:48:51 1.22 +++ loncom/xml/run.pm 2002/02/15 21:33:12 1.23 @@ -1,6 +1,6 @@ package Apache::run; # -# $Id: run.pm,v 1.22 2001/12/11 15:48:51 albertel Exp $ +# $Id: run.pm,v 1.23 2002/02/15 21:33:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,12 +39,11 @@ sub evaluateold { if ($@ eq '') { $result = $safeeval->reval('return $_;'); } else { - &Apache::lonxml::error("substitution on:$expression:with:$decls:caused"); + &Apache::lonxml::error("substitution on:$expression:with:$decls:caused:$@:"); } } else { - &Apache::lonxml::error("defining:$expression:caused"); + &Apache::lonxml::error("defining:$expression:caused:$@:"); } - if ($@ ne '') {&Apache::lonxml::error($@);} return $result } @@ -80,8 +79,7 @@ sub run { $@=''; my (@result)=$safeeval->reval($code); if ($@ ne '' && !$hideerrors) { - &Apache::lonxml::error(":$code:caused"); - &Apache::lonxml::error($@); + &Apache::lonxml::error(":$@: occured while running :$code:"); } if ( $#result < '1') { return $result[0];