Skip to content

Commit

Permalink
display last error filename and line
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-numerical-software committed Jul 31, 2021
1 parent 2dd5b3c commit 91159ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/tests_manager/functions/test_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ function displayTestCaseFail(test_case)
else
if strcmp(class(test_case.msg), 'struct') == true
disp([' ', test_case.msg.message]);
if (length(test_case.msg.stack) > 1) && (test_case.msg.stack(1).line ~= 0)
disp([' ', _('File:'), ' ', test_case.msg.stack(1).file]);
disp([' ', _('Line:'), ' ', test_case.msg.stack(1).line]);
else
if (length(test_case.msg.stack) > 2) && (test_case.msg.stack(2).line ~= 0)
disp([' ', _('File:'), ' ', test_case.msg.stack(2).file]);
disp([' ', _('Line:'), ' ', test_case.msg.stack(2).line]);
end
end
else
disp([' ', test_case.msg]);
end
Expand Down

0 comments on commit 91159ba

Please sign in to comment.