Re: Observing exceptions in a destructor

2015-04-21 Thread Mark Isaacson via Digitalmars-d-learn
Oh well :(. Yeah, it's just for debugging. I want to publish a script that automatically gathers relevant debug information so that my users can just copy paste it all into one place, ready for me to take a look even if I can't repro. One of the primitives in my script is a wrapper around std.pro

Re: Observing exceptions in a destructor

2015-04-21 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, April 22, 2015 01:02:15 Mark Isaacson via Digitalmars-d-learn wrote: > I'd like to be able to know if my destructor is being called > because an exception was thrown. Any way to do that? > > I tried this: http://ideone.com/JbXH2w > > (Pasted here for convenience): > > import std.stdi

Re: Observing exceptions in a destructor

2015-04-21 Thread ketmar via Digitalmars-d-learn
On Wed, 22 Apr 2015 01:02:15 +, Mark Isaacson wrote: > I'd like to be able to know if my destructor is being called because an > exception was thrown. Any way to do that? sorry, you can't. signature.asc Description: PGP signature

Observing exceptions in a destructor

2015-04-21 Thread Mark Isaacson via Digitalmars-d-learn
I'd like to be able to know if my destructor is being called because an exception was thrown. Any way to do that? I tried this: http://ideone.com/JbXH2w (Pasted here for convenience): import std.stdio, std.exception; struct Catcher { ~this() { try {} catch (Exception e