[LON-CAPA-cvs] cvs: loncom /xml run.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 15 Feb 2002 21:33:12 -0000
albertel Fri Feb 15 16:33:12 2002 EDT
Modified files:
/loncom/xml run.pm
Log:
- should only create 1 merror message to the instructor
Index: loncom/xml/run.pm
diff -u loncom/xml/run.pm:1.22 loncom/xml/run.pm:1.23
--- loncom/xml/run.pm:1.22 Tue Dec 11 10:48:51 2001
+++ loncom/xml/run.pm Fri Feb 15 16:33:12 2002
@@ -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 @@
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 @@
$@='';
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];