Index: /issm/trunk/cron/nightlyrun.sh
===================================================================
--- /issm/trunk/cron/nightlyrun.sh	(revision 1738)
+++ /issm/trunk/cron/nightlyrun.sh	(revision 1739)
@@ -140,4 +140,5 @@
 
 #Launch matlab and the nightly run script
+mktemp matlaberror.log
 cat > matlab_run.m << EOF
 startup
@@ -147,5 +148,7 @@
 catch me,
 	%An error occured, get report and exit
-	getreport(me)
+	message=getReport(me)
+	fid=fopen('matlaberror.log', 'wt');
+	fprintf(fid,'%s',message);
 end
 exit
