Add some friendly messages to libcxx calls to abort().

llvm-svn: 186951
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 1468d0cec7676c4ed2a1982d05a640317eed13cd
diff --git a/src/exception.cpp b/src/exception.cpp
index 1d2f6b2..d3e1b29 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 #include <stdlib.h>
+#include <stdio.h>
 
 #include "exception"
 
@@ -88,12 +89,14 @@
 #endif  // _LIBCPP_NO_EXCEPTIONS
         (*get_terminate())();
         // handler should not return
+        printf("terminate_handler unexpectedly returned\n");
         ::abort ();
 #ifndef _LIBCPP_NO_EXCEPTIONS
     }
     catch (...)
     {
         // handler should not throw exception
+        printf("terminate_handler unexpectedly threw an exception\n");
         ::abort ();
     }
 #endif  // _LIBCPP_NO_EXCEPTIONS
@@ -109,6 +112,7 @@
     return __cxa_uncaught_exception();
 #else  // __APPLE__
     #warning uncaught_exception not yet implemented
+    printf("uncaught_exception not yet implemented\n");
     ::abort();
 #endif  // __APPLE__
 }
@@ -146,6 +150,7 @@
     __cxa_decrement_exception_refcount(__ptr_);
 #else
     #warning exception_ptr not yet implemented
+    printf("exception_ptr not yet implemented\n");
     ::abort();
 #endif  // __APPLE__
 }
@@ -157,6 +162,7 @@
     __cxa_increment_exception_refcount(__ptr_);
 #else
     #warning exception_ptr not yet implemented
+    printf("exception_ptr not yet implemented\n");
     ::abort();
 #endif  // __APPLE__
 }
@@ -173,6 +179,7 @@
     return *this;
 #else  // __APPLE__
     #warning exception_ptr not yet implemented
+    printf("exception_ptr not yet implemented\n");
     ::abort();
 #endif  // __APPLE__
 }
@@ -207,6 +214,7 @@
     return ptr;
 #else  // __APPLE__
     #warning exception_ptr not yet implemented
+    printf("exception_ptr not yet implemented\n");
     ::abort();
 #endif  // __APPLE__
 }
@@ -220,6 +228,7 @@
     terminate();
 #else  // __APPLE__
     #warning exception_ptr not yet implemented
+    printf("exception_ptr not yet implemented\n");
     ::abort();
 #endif  // __APPLE__
 }