Merge pull request #2053 from reactormonk/message-for-koch-temp

report how to create a compiler stacktrace #1280
This commit is contained in:
Andreas Rumpf 2015-02-12 09:40:31 +01:00
commit f7195becac
2 changed files with 18 additions and 1 deletions

View file

@ -720,7 +720,10 @@ type
proc handleError(msg: TMsgKind, eh: TErrorHandling, s: string) =
template quit =
if defined(debug) or gVerbosity >= 3 or msg == errInternal:
writeStackTrace()
if stackTraceAvailable():
writeStackTrace()
else:
msgWriteln("No stack traceback available\nTo create a stacktrace, rerun compilation with ./koch temp c <file>")
quit 1
if msg >= fatalMin and msg <= fatalMax: