|
I just noticed that the __tostring metamethod is not invoked when an error is at the top level in both luajit and lua: error(setmetatable({},{__tostring=function(o) return "My error msg" end;}) This seems like bad beahviour to me.... makes custom error objects a bit harder.