[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Errors in finalizers
- From: Andrew Gierth <andrew@...>
- Date: Tue, 04 Jun 2019 22:08:05 +0100
>>>>> "David" == David Heiko Kolf <david@dkolf.de> writes:
>> This. DOES. NOT. MATTER. to me. All that matters is that the error
>> MUST NOT BE IGNORED.
David> But this is exactly what could happen when you throw the error
David> in a finalizer: The code might currently be in a pcall which
David> doesn't expect your finalizer error and therefor also doesn't
David> react to it -- the code following the pcall would continue as
David> usual, you just skipped some random code.
Except that this can't happen because I already replaced the visible
pcall() function with one that does the necessary error recovery:
https://github.com/pllua/pllua-ng/blob/master/src/error.c#L718
My complaint about ignoring errors in finalizers is, like my earlier
complaint about function values for <toclose>, based on the fact that it
results in errors being caught in a way that the sandboxing code can't
control.
--
Andrew.