[Issue 14623] New: Checking for in-flight exceptions at runtime

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 27 16:54:36 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14623

          Issue ID: 14623
           Summary: Checking for in-flight exceptions at runtime
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: markisaa at umich.edu

We should have a function that allows you to see if there are exceptions
currently in flight.

Brought this up at DConf and Andrei suggested that it should be a runtime
function and that we might already have a lot of the machinery to make this
happen. He also referenced what C++ is working on for this:
http://en.cppreference.com/w/cpp/error/uncaught_exception

An example:

struct Foo {
  ~this() {
    if (we_are_unwinding_due_to_an_exception) {
      logSomeStuff();
    }
  }
}

--


More information about the Digitalmars-d-bugs mailing list