lua-users home
lua-l archive

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


On Tue, Apr 6, 2010 at 10:05 AM, Patrick Donnelly <batrick@batbytes.com> wrote:
> This isn't quite true. dofile is not protected from errors during
> load. Apparently the only functional difference between the two code
> snippets is the stack traceback:

Thanks, I stand corrected. It isn't entirely consistent, hence the confusion.

I initially assumed it was not protected at all, and Luiz corrected
me.  But if I dofile something that has a run-time error, it's
definitely not a protected call either.

Moral of story: pcall(dofile,filename) to be really sure ....