[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: errors needs to be tostring()'d
- From: HyperHacker <hyperhacker@...>
- Date: Sat, 19 Nov 2011 02:37:24 -0700
On Sat, Nov 19, 2011 at 02:32, Daurnimator <quae@daurnimator.com> wrote:
> 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.
>
>
Isn't this fixed in 5.2?
--
Sent from my toaster.