This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 20/22] Replace throw_exception with throw in some cases
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 3 Apr 2019 18:05:00 +0100
- Subject: Re: [PATCH v2 20/22] Replace throw_exception with throw in some cases
- References: <20190227201849.32210-1-tom@tromey.com> <20190227201849.32210-21-tom@tromey.com>
On 02/27/2019 08:18 PM, Tom Tromey wrote:
> This replaces throw_exception with "throw;" when possible. This was
> written by script. The rule that is followed is that uses of the
> form:
>
> catch (... &name)
> {
> ...
> throw_exception (name);
> }
>
> ... can be rewritten. It's possible (though IMO unlikely) that such a
> case could be wrong, if the exception object is rewritten in the body
> of the catch. (One option here might be to catch a const & instead.)
I think this paragraph is stale, given that the current patchset catches
by "const &" already. LGTM with that striped out.
Thanks,
Pedro Alves