C++ Logo

std-proposals

Advanced search

Re: Stacktrace from exception

From: Edward Catmur <ecatmur_at_[hidden]>
Date: Thu, 29 Apr 2021 15:45:13 +0100
On Thu, 29 Apr 2021 at 13:41, Michael Knaup via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> The point is that something which comes with additional costs - and these
> seem to be noticeable - should not be added if it only makes sense when
> you‘ve specific use cases or experience.
>

I dispute that a small allocation to store a stack trace from throw point
to handler (8 bytes per frame!) is noticeable next to the current cost of
exception handling. As for the specific use cases, see above - this is
something that is frequently requested by users.

Beside this it was already stated multiple times that exceptions are not a
> tool for handling bugs.
>

Stating something multiple times doesn't make it a fact. Exceptions are
used as a tool for handling bugs in real-world code, whether or not you
approve of that use.

Received on 2021-04-29 09:45:27