Re: chain of exceptions, next method

2024-03-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, March 6, 2024 6:06:34 AM MST kdevel via Digitalmars-d-learn wrote: > On Saturday, 10 September 2022 at 08:48:39 UTC, Andrej Mitrovic > > wrote: > > [...] > > I wish the compiler would rewrite scope(failure) to use chained > > exceptions. Otherwise any exceptions thrown within > >

Re: chain of exceptions, next method

2024-03-06 Thread kdevel via Digitalmars-d-learn
On Saturday, 10 September 2022 at 08:48:39 UTC, Andrej Mitrovic wrote: [...] I wish the compiler would rewrite scope(failure) to use chained exceptions. Otherwise any exceptions thrown within scope(failure) can end up losing information about what was the original exception that was thrown.

Re: chain of exceptions, next method

2022-09-10 Thread Andrej Mitrovic via Digitalmars-d-learn
On Sunday, 14 August 2022 at 02:30:43 UTC, Paul Backus wrote: On Sunday, 14 August 2022 at 02:07:05 UTC, Ali Çehreli wrote: This automatic "combining" of exceptions happens for cleanup code like scope(exit). (I remember bug(s) for scope(failure).): To be precise, an exception thrown inside

Re: chain of exceptions, next method

2022-08-13 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 14 August 2022 at 02:07:05 UTC, Ali Çehreli wrote: This automatic "combining" of exceptions happens for cleanup code like scope(exit). (I remember bug(s) for scope(failure).): To be precise, an exception thrown inside a 'finally' block gets chained onto the previous exception,

Re: chain of exceptions, next method

2022-08-13 Thread Ali Çehreli via Digitalmars-d-learn
On 8/13/22 15:59, kdevel wrote: > Quote from `src/druntime/src`: > > ``` > /** > * Returns: > * A reference to the _next error in the list. This is used when a new > * $(D Throwable) is thrown from inside a $(D catch) block. The > originally > * caught $(D