<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="moz-cite-prefix">Am 29.03.21 um 17:19 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite" cite="mid:CAACncetc6iHHAk4u9yJNrexuHAqDU=w=cnPbAwRZQwJXtOOiFA@mail.gmail.com">
<div dir="ltr"><br>
<div>Thanks for the reply. I don't suppose you have ever gotten
a debugger to work with JW Lua either?</div>
</div>
</blockquote>
<p><br>
</p>
<p>No, I never tried. But to get more useful stacktraces, I defined
a module <font face="monospace">lib.xpcall</font> that looks like
this:</p>
<blockquote>
<pre>local function messageHandler(message)
local eol = finale.FCString():GetEOL()
print(debug.traceback(message, 2):gsub("\r\n", "\n"):gsub("\n", eol))
end
return function(main, ...)
return xpcall(main, messageHandler, {...})
end
</pre>
</blockquote>
<p>I then wrap my entire code like this:</p>
<blockquote>
<pre>function main(args)
-- Here goes the code
end
require "lib.xpcall" (main, ...)</pre>
<p><font face="monospace"><br>
</font></p>
</blockquote>
<pre class="moz-signature" cols="0">--
Notengrafik Berlin GmbH
HRB 150007
UstID: DE 289234097
Geschäftsführer:
Thomas Weber und Werner J. Wolff
fon: +49 30 25359505
Friedrichstraße 23a
10969 Berlin
notengrafik.com</pre>
</body>
</html>