File: printTestError.m

package info (click to toggle)
dynare 6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 67,796 kB
  • sloc: cpp: 79,110; ansic: 28,917; objc: 12,445; yacc: 4,537; pascal: 1,993; lex: 1,441; sh: 1,132; python: 634; makefile: 628; lisp: 163; xml: 18
file content (20 lines) | stat: -rw-r--r-- 841 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function printTestError(filename, exception)
    fprintf('\n********************************************\n')
    fprintf('****** Dynare test error encountered *******\n')
    fprintf('********************************************\n')
    fprintf('  While running file: %s\n', filename);
    if isoctave
        fprintf('             message: %s\n', exception.message)
        if (isfield(exception, 'stack'))
            fprintf('\n  Stacktrace:\n')
            for i=1:size(exception.stack, 1)
                fprintf('  %s(%s):%d.%d\n', exception.stack(i).file, exception.stack(i).name, ...
                        exception.stack(i).line, exception.stack(i).column);
            end
        end
    else
        fprintf('\n')
        disp(getReport(exception))
    end
    fprintf('********************************************\n\n\n')
end