This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 20/22] Replace throw_exception with throw in some cases


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]