Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
When procedures in os/syncio module failed and throw an exception at compile time, it doesn't print stack trace.
So it is hard to find which procedure threw the exception.
For example:
testvm.nim
static:
writeFile("/nopermission", "")
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2023-08-25
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 53d43e96716539d96e6a1e5f3926a3fe3a11e2dd
active boot switches: -d:release
Current Output
$ nim c testvm.nim
..................................................................................................................syncio.nim(868) writeFile
Error: unhandled exception: cannot open: /nopermission [IOError]
Description
When procedures in os/syncio module failed and throw an exception at compile time, it doesn't print stack trace. So it is hard to find which procedure threw the exception.
For example: testvm.nim
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64] Compiled at 2023-08-25 Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 53d43e96716539d96e6a1e5f3926a3fe3a11e2dd active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response