diff options
author | Howard Hinnant <hhinnant@apple.com> | 2010-05-27 17:06:52 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2010-05-27 17:06:52 +0000 |
commit | 019fe4b8fdbc5958746e0026fa14b43c2477a7a8 (patch) | |
tree | 1d87086ea34315a5f3ba06254c86ef7c2f696576 /libcxx/src/exception.cpp | |
parent | 31729162bcfe8073356c98d046e9838b0935d2e1 (diff) | |
download | bcm5719-llvm-019fe4b8fdbc5958746e0026fa14b43c2477a7a8.tar.gz bcm5719-llvm-019fe4b8fdbc5958746e0026fa14b43c2477a7a8.zip |
[except.nested]
llvm-svn: 104850
Diffstat (limited to 'libcxx/src/exception.cpp')
-rw-r--r-- | libcxx/src/exception.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp index e48e9c4901e..9bed6f49bf2 100644 --- a/libcxx/src/exception.cpp +++ b/libcxx/src/exception.cpp @@ -142,6 +142,23 @@ exception_ptr& exception_ptr::operator=(const exception_ptr& other) #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 |