[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: guarantees of exception safety in Lua
- From: "Sam Roberts" <vieuxtech@...>
- Date: Sun, 26 Oct 2008 20:25:58 -0700
On Sat, Oct 25, 2008 at 3:30 PM, David Manura <email@example.com> wrote:
> I was wondering what guarantees of exception safety are provided in Lua.
> local function g()
> local x=1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17,18,19,20,
> local x = 1
> local function test()
> x = x + 1 -- INC
> x = x - 1 -- DEC
If you want to deal with memory allocation errors, you have to write
all your code as if an error can be raised at any time, don't you?
What other choices are there?