show the Maple call stack as of the most recent error
The tracelast command will display the Maple call stack from the time of the last error that occurred (whether it was trapped by the try-catch construct or not). This is the same display that would have been generated if printlevel had been set to 3 or higher at the time the error occurred, and the error had not been trapped.
The tracelast command will only work at the top level. It cannot be executed from within a procedure.
The information provided by tracelast is transient. It can become unavailable at any time that Maple does a garbage collection. Therefore, it is best to use tracelast immediately after an error occurs.
The trace information displayed begins with a trace of the surrounding procedure activations (beginning with the top level if 50 or less procedures were active). This is followed by the error message that caused the trace back, and the local variables of the procedure in which the error occurred.
Each procedure activation is displayed as two lines. The first line shows the arguments with which the procedure was invoked.
The second line begins with #, the procedure name and statement number (see showstat), and the statement being executed in that procedure.
If the tracelast command was terminated by a colon instead of a semicolon, the procedure arguments are elided and "..." is displayed instead. This is useful if the arguments are large Arrays, Matrices, Vectors, Records, or modules.
The procedure name and statement number is displayed in a form that is suitable as arguments for the showstat and stopat debugging facilities.
If the global variable debugger/max_width is set to a positive integer value, each value of an argument or local variable displayed by tracelast is truncated to that width, followed by "...", and then the appropriate sequence of closing delimiters for any incompletely printed expressions.
f := proc() g(args) end proc:
g := proc() if h(args) then args end if end proc:
h := proc() dsolve(args) end proc:
Error, (in dsolve) found wrong extra argument(s): y
f called with arguments: diff(y(x), x)+y(x)+x = 0, y
g called with arguments: diff(y(x), x)+y(x)+x = 0, y
#(g,1): if h(_passed) then ... end if
h called with arguments: diff(y(x), x)+y(x)+x = 0, y
dsolve called with arguments: diff(y(x), x)+y(x)+x = 0, atomizenames = true, build = false, type = none, y
locals defined as: n_ODEs = 1, ARGS = [y], METHOD = METHOD, args2 = (diff(y(x), x)+y(x)+x = 0, y), zz = , n = n, funcs = funcs, funcs_in_args = funcs_in_args, ans = ans, type_of_conversion = type_of_conversion, use_physics = false, j = j, vars = vars
h := proc()
g := proc()
1* if h(_passed) then
Download Help Document
What kind of issue would you like to report? (Optional)