And one more newbie question about exceptions (after this I stop - I promise!):
How can I access the lines numbers in the stacktrace of an exception? To get the stack in general I tried:
except Exception as ex:
echo ex.trace
but of course I get "Error: undeclared field: 'trace'" because trace is not exported in the definition in exceptions.nim.
https://nim-lang.org/docs/system.html#StackTraceEntry - definition of a stack trace object, has .line
https://nim-lang.org/docs/system.html#getStackTraceEntries - get stack trace