Skip to content

Commit

Permalink
Display stack trace in case of errors when using --srcFile
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiRegiani committed Aug 4, 2018
1 parent 7812995 commit 3881ab4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/inim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ proc init(preload: string = nil) =
# Compilation error
else:
bufferRestoreValidCode()
# Imports display more of the stack trace in case of errors, instead of one liners error
currentExpression = "import " # Pretend it was an import for showError()
showError(output)
cleanExit(1)

Expand Down

0 comments on commit 3881ab4

Please sign in to comment.