Skip to content

Commit 709130b

Browse files
committed
Revised the whole error handling system. Things should be more stable and nicer now.
1 parent 77cae03 commit 709130b

File tree

4 files changed

+258
-286
lines changed

4 files changed

+258
-286
lines changed

preprocess-cl.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function printfError(s, ...)
218218
end
219219

220220
function errorLine(err)
221-
printError("Error: "..tostring(err))
221+
printError(tryToFormatError(err))
222222
os.exit(1)
223223
end
224224

@@ -509,7 +509,7 @@ for i, pathIn in ipairs(pathsIn) do
509509
xpcall(function()
510510
sendMessage("fileerror", pathIn, err)
511511
end, function(err)
512-
io.stderr:write("Additional error in 'fileerror' message handler...\n", pp.tryToFormatError(tostring(err)), "\n")
512+
printfError("Additional error in 'fileerror' message handler...\n%s", pp.tryToFormatError(err))
513513
end)
514514
os.exit(1)
515515
end,

0 commit comments

Comments
 (0)