Catch line number

is there a way to determine on what file and line number an error has occurred that was tried-and-caught?

(I don’t think a println(stacktrace()) gives me this, at least not in a way that I can recognize it. At the time of a stacktrace() in the catch, it’s already unwound the stack.)

Use catch_stacktrace() in your catch block instead (or stacktrace(catch_backtrace()) on 0.7). See here for the relevant docs.