public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Erik Wienhold <[email protected]>
Cc: Pierre Forstmann <[email protected]>
Cc: a.kozhemyakin <[email protected]>
Cc: [email protected]
Subject: Re: pltcl crashes due to a syntax error
Date: Sun, 02 Jun 2024 18:15:48 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAM-sOH9zC5VeycS0BFCV4CAEfDL4OLEh_41oWtVLfbOZCtxNFw@mail.gmail.com>
<[email protected]>
Erik Wienhold <[email protected]> writes:
> Tcl_GetVar returns null if errorInfo does not exist. Omitting econtext
> from errcontext in that case looks like the proper fix to me.
Yeah, that was the conclusion I came to last night while sitting in
the airport, but I didn't have time to prepare a cleaned-up patch.
The new bit of information that this bug report provides is that it's
possible to get a TCL_ERROR result without Tcl having set errorInfo.
That seems a tad odd, and it must happen only in weird corner cases,
else we'd have heard of this decades ago. Not sure if it's worth
trying to characterize those cases further, however.
> Or just do away with throw_tcl_error and call ereport directly.
I'd say this adds to the importance of having throw_tcl_error,
because now it's even more complex than before, and there are
multiple call sites.
> Compare
> that to pltcl_trigger_handler where the same case is handled like this:
Hm, I wonder why that's not using throw_tcl_error. I guess because
it wants to give its own primary message, but still ...
regards, tom lane
view thread (10+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: pltcl crashes due to a syntax error
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox