lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Jan Schütze wrote:
> so I should call the mainfunction with pcall and ignore its 
> message this way?
> Hmm, should be possible - but looks like an evil hack :-).

In fact it's not an evil hack, it's the way error management works in Lua. It's similar to exceptions in C++. Whether Lua errors or C++ exceptions are a good way to report errors is a religious debate, but in both case it's a reliable, well defined and powerful mechanism. Whether you use it or abuse it is up to you.