The "already initialized" error message itself seems to be a subtle bug that may not be worth fixing. But what you're facing seems to actually be a documentation problem. A closer read of the default function gave me the hint.
Edit: For reference, here's boot.lua as is stored in the code: https://paste.scratchbook.ch/view/ff06bf36 so that you can actually see the line numbers that error messages refer to. Not sure why newlines are removed. Maybe for historical reasons, because if it's to save bytes, a 0.6% saving doesn't seem worth the obfuscation when looking for line numbers in the source.
Thank you for checking the code. Should've done this on my own, derp.
I decided to replace debug.traceback to solve my problem (getting usable tracebacks from moonscript), and leave errorhandler alone for now.
pgimeno wrote: ↑Fri Dec 14, 2018 10:16 pm
The "already initialized" error message itself seems to be a subtle bug that may not be worth fixing.
It's no showstopper, just confusing and makes it hard to find the error in your handler. I believe I've seen this error before, in a different context, but I can't remember the details.