[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Error messages
- From: "Thiago L." <fakedme@...>
- Date: Thu, 29 May 2014 22:44:09 -0300
As you all know, chunks take a chunk name string thingy, and it can be
"=<whatever>" if you want to customize the chunk name on error messages
and stuff... What if you could make a function handle error message
displaying?
Something like...
load(chunk, <stuff>, function(chunkName, lineNumber, errorData, lineData
stackTraceback) return string.format("%s:%s:
%s",chunkName,lineNumber+10,errorData) end)
and then the following chunk:
error("my error")
would print:
myChunk:11: my error
<stack traceback stuff>