Perhaps it's better to just add a third call argument with the status, and tolerate the non-intuitive ordering.
I haven't looked at the implementation, but a bigger question may be whether the status is available to the code currently invoking __close.
Another possible solution would be to pass no value as second argument
to __close.
On 25.09.22 14:51, John Belmonte wrote:
> Since the manual says "nil and false are ignored as to-be-closed
> values", I wonder if the first arg of __close can be overloaded to
> convey the error case, by the value false, which otherwise can't happen.