lua-users home
lua-l archive

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


>  Roberto> Another option: can't you do whatever is being done in the end
>  Roberto> of 'pcall' when you raise the error?
> 
> The error is being raised somewhere outside of my code, I don't have any
> control over that. I do catch and rethrow it, but then we're back to the
> problem of always having to create subtransactions.

If the error is being raised outside your code, it could as well not
be raised, couldn't it? And then the code could continue to access
the PG after the condition, which is what you want to avoid.

I suspect you must somehow couple the GP error to a Lua error. If so,
that is where the error could be handled (at least with respect to the
GP state).

-- Roberto