lua-users home
lua-l archive

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


On Tue, Mar 8, 2011 at 6:43 PM, Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
> Maybe the point of assert is to be visible, to remind you that you
> need to do proper error handling there.

One strategy is to call important functions using pcall(), and then at
least you are not dumping a stack-trace on the poor user - unless you
_want_ to, of course!

There is definitely such a thing as too many assert() calls...

(I always liked the Perl-ism 'do_something() or die()' but expressions
cannot be statements in Lua)

steve d.