I was reading the manual on stack traces and thought of this issue again. My understanding is that I can get the stack trace with try ... catch, eg in this MWE:
using Compat # for two-argument DomainError in 0.6
bad(x) = throw(DomainError(x, "I don't like this value."))
st = try
bad(1)
catch
catch_stacktrace()
end
Is there a way of extracting 1 (=x) and "I don't like this value." from it?
Also, if I happened to just run into an error, and was not prepared with a try ... catch like above, there is no way I can extract this information ex post; is this correct?