summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-deb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/trac-deb.lua')
-rw-r--r--tex/context/base/mkiv/trac-deb.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua
index 03df86825..c9a05f238 100644
--- a/tex/context/base/mkiv/trac-deb.lua
+++ b/tex/context/base/mkiv/trac-deb.lua
@@ -220,7 +220,13 @@ function tracers.printerror(specification)
else
report_nl()
if luaerrorline then
- report("lua error on line %s in file %s:\n\n%s",linenumber,filename,lastluaerror)
+ if linenumber == 0 or not filename or filename == "" then
+ print("\nfatal lua error:\n\n",lastluaerror,"\n")
+ os.exit(1)
+ return
+ else
+ report("lua error on line %s in file %s:\n\n%s",linenumber,filename,lastluaerror)
+ end
elseif lastmpserror then
report("mp error on line %s in file %s:\n\n%s",linenumber,filename,lastmpserror)
else