[Bug 235033] [feature suggestion] Stack should be unwound and exception should be printed when the C++ application throws an uncaught exception
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jan 17 21:28:58 UTC 2019
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: bugs at FreeBSD.org
Reporter: yuri at freebsd.org
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.
More information about the freebsd-bugs
mailing list