Fix exception handling under MATLAB in unitary test infrastructure.
The getReport() function of MATLAB expects an exception coming from the "catch" statement. It is not happy with the value returned by lasterror().time-shift
parent
f0f355e9b5
commit
8daed40ab3
|
@ -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']);
|
||||
|
|
Loading…
Reference in New Issue