commit | 019fe4b8fdbc5958746e0026fa14b43c2477a7a8 | [log] [tgz] |
---|---|---|
author | Howard Hinnant <hhinnant@apple.com> | Thu May 27 17:06:52 2010 +0000 |
committer | Howard Hinnant <hhinnant@apple.com> | Thu May 27 17:06:52 2010 +0000 |
tree | 1d87086ea34315a5f3ba06254c86ef7c2f696576 | |
parent | 31729162bcfe8073356c98d046e9838b0935d2e1 [diff] [blame] |
[except.nested] llvm-svn: 104850
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp index e48e9c4..9bed6f4 100644 --- a/libcxx/src/exception.cpp +++ b/libcxx/src/exception.cpp
@@ -142,6 +142,23 @@ #endif } +nested_exception::nested_exception() + : __ptr_(current_exception()) +{ +} + +nested_exception::~nested_exception() +{ +} + +void +nested_exception::rethrow_nested /*[[noreturn]]*/ () const +{ + if (__ptr_ == nullptr) + terminate(); + rethrow_exception(__ptr_); +} + } // std