Is there a way to get the actual messages created when evaluating an expression in Mathematica? Say I solve ODE numerically and it explodes as if
In[1] := sol = NDSolve[{x'[t] == -15 x[t], x[0] == 1}, x, {t, 0, 1},
Method -> "ExplicitEuler"];
In this case, I will get an error NDSolve::mxstindicating that the maximum number of 10,000 steps has been reached in t == 0.08671962566152185. Now, if I look at a variable $MessageList, I get only the message name; in particular, information about the meaning of twhere it NDSolvedecided to exit was lost.
Now I can always get this information from solusing a function InterpolatingFunctionDomainfrom one of the standard add-ons, but if I can somehow get it out of the message, it will be very useful.
source
share