[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_pcall vs lua_call
- From: Matthew Paul Del Buono <delbu9c1@...>
- Date: Fri, 18 Jul 2008 13:50:40 -0400 (EDT)
When a lua state panics, it is no longer valid. On the other hand, if you catch something with a pcall, you can recover from the error.
Basically the question becomes "Do you want to use the state after the error." If not, you're probably better off letting it panic, as pcall imposes some amount of overhead.
-- Matthew P. Del Buono