https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235033

            Bug ID: 235033
           Summary: [feature suggestion] Stack should be unwound and
                    exception should be printed when the C++ application
                    throws an uncaught exception
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: [email protected]
          Reporter: [email protected]

This program
> int main() {
>   throw "Hello!";
> }
prints
> Abort trap

It could unwind stack and print the exception message in cases when there are
pending exceptions.                

The C++17 standard draft says
> 18.3 (note 9) If no matching handler is found, the function std::terminate() 
> is called; whether or not the stack is unwound before this call to 
> std::terminate() is implementation-defined.

(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4713.pdf)

I propose that such stack unwinding is performed. This would make the behavior
of programs that fail to catch exceptions more user friendly, and their error
message more informative.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to