C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Adding stacktrace to std::exception
From: Marcin Jaczewski (marcinjaczewski86_at_[hidden])
Date: 2020-11-13 02:56:39


pt., 13 lis 2020 o 07:54 Thiago Macieira via Std-Proposals
<std-proposals_at_[hidden]> napisał(a):
>
> On Thursday, 12 November 2020 06:14:52 PST Antony Polukhin via Std-Proposals
> wrote:
> > 1) Implement __cxa_allocate_exception2 that allocates (see note 0)
> > additional space (see note 1) to store the stacktrace AND puts a mark
> > (see note 2) into the allocated memory, that this is an exception with
> > a stacktrace
>
> Another note: one condition for throwing exceptions is being out of memory. So
> the implementation must figure out how to throw an exception when it can't
> allocate space for the stack trace.
>
> Also, stack traces' size are not known at compile time, unlike exceptions
> classes.
>

Do we need a full stack trace to be this useful?
Let say that Standard guarantees only last 20 positions from it.
Rest will be available only if there is free memory for it.

> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DPG Cloud Engineering
>
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals


STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups