August 21, 2017 Re: Exception chaining and collectException | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nemanja Boric | On 08/19/2017 01:58 PM, Nemanja Boric wrote:
> C++ also provides a way to inspect if you're in the middle of the stack
> unwinding caused by an exception, to make this a bit more controllable,
> and I would think we should provide the similar primitive:
> http://en.cppreference.com/w/cpp/error/uncaught_exception.
>
I don't know whether C++11 changed matters but according to popular C++98 wisdom, we were told "Don't use [std::uncaught_exception]":
www.gotw.ca/gotw/047.htm
Ali
|
August 22, 2017 Re: Exception chaining and collectException | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | On Monday, 21 August 2017 at 20:15:53 UTC, Ali Çehreli wrote: > On 08/19/2017 01:58 PM, Nemanja Boric wrote: > >> C++ also provides a way to inspect if you're in the middle of the stack >> unwinding caused by an exception, to make this a bit more controllable, >> and I would think we should provide the similar primitive: >> . >> > > I don't know whether C++11 changed matters but according to popular C++98 wisdom, we were told "Don't use [std::uncaught_exception]": > > www.gotw.ca/gotw/047.htm > > Ali Rationale for changing this in C++17 is actually comming from Herb Sutter and it is referring to gotw47: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3614.pdf |
August 22, 2017 Re: Exception chaining and collectException | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nemanja Boric | On Tuesday, 22 August 2017 at 07:03:03 UTC, Nemanja Boric wrote: > On Monday, 21 August 2017 at 20:15:53 UTC, Ali Çehreli wrote: >> On 08/19/2017 01:58 PM, Nemanja Boric wrote: >> >>> C++ also provides a way to inspect if you're in the middle of the stack >>> unwinding caused by an exception, to make this a bit more controllable, >>> and I would think we should provide the similar primitive: >>> . >>> >> >> I don't know whether C++11 changed matters but according to popular C++98 wisdom, we were told "Don't use [std::uncaught_exception]": >> >> www.gotw.ca/gotw/047.htm >> >> Ali > > Rationale for changing this in C++17 is actually comming from Herb Sutter and it is referring to gotw47: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3614.pdf Sorry, on the phone, so I've pasted wrong link: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4152.pdf |
Copyright © 1999-2021 by the D Language Foundation