cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
944 stars 210 forks source link

Stack traces in the Shell and Lua REPL #231

Open SquidDev opened 5 years ago

SquidDev commented 5 years ago

When a program or input to the Lua REPL errors, we should display the stack trace that caused this error, along with the message itself:

This is something mbs, OC and "actual proper" Lua have had for a while, and it helps a lot in tracking down the issue.

Just a couple of thoughts on the implementation:

There's also a couple of things worth discussing:

Lupus590 commented 5 years ago

I think for traceback order it will be best to match other lua implementations. Perhaps there should be a traceback order setting?