[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is dofile really called for anymore?
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 6 Apr 2010 10:32:15 +0200
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 ....