diff --git a/matlab/utilities/tests/mtest.m b/matlab/utilities/tests/mtest.m index ae8739ef2..29f771613 100644 --- a/matlab/utilities/tests/mtest.m +++ b/matlab/utilities/tests/mtest.m @@ -78,11 +78,12 @@ for i=1:nn fprintf(tid,str); end fprintf(tid,['LOG = NaN;\n']); - fprintf(tid,'catch\n'); - fprintf(tid,'exception = lasterror;\n'); if isoctave + fprintf(tid,'catch\n'); + fprintf(tid,'exception = lasterror;\n'); fprintf(tid, 'LOG = ''%s'';\n','The Log output is not available with Octave!'); else + fprintf(tid,'catch exception\n'); fprintf(tid,['LOG = getReport(exception,''extended'');\n']); end fprintf(tid,['T = NaN;\n']);