am d05b021c: Add get_terminate() / get_unexpected() functions required by libc++.

* commit 'd05b021ced29ae0ce32a5801db33b5343790b5c9':
  Add get_terminate() / get_unexpected() functions required by libc++.
diff --git a/src/exception.cc b/src/exception.cc
index ec9d4f0..97e014d 100644
--- a/src/exception.cc
+++ b/src/exception.cc
@@ -183,7 +183,7 @@
 /** The global termination handler. */
 static terminate_handler terminateHandler = abort;
 /** The global unexpected exception handler. */
-static unexpected_handler unexpectedHandler = abort;
+static unexpected_handler unexpectedHandler = std::terminate;
 
 /** Key used for thread-local data. */
 static pthread_key_t eh_key;
@@ -1223,6 +1223,7 @@
 	 */
 	void terminate()
 	{
+		fprintf(stderr, "Terminate called\n");
 		static __cxa_thread_info *info = thread_info_fast();
 		if (0 != info && 0 != info->terminateHandler)
 		{
@@ -1259,5 +1260,28 @@
 		__cxa_thread_info *info = thread_info();
 		return info->globals.uncaughtExceptions != 0;
 	}
-
+	/**
+	 * Returns the current unexpected handler.
+	 */
+	unexpected_handler get_unexpected() throw()
+	{
+		__cxa_thread_info *info = thread_info();
+		if (info->unexpectedHandler)
+		{
+			return info->unexpectedHandler;
+		}
+		return unexpectedHandler;
+	}
+	/**
+	 * Returns the current terminate handler.
+	 */
+	terminate_handler get_terminate() throw()
+	{
+		__cxa_thread_info *info = thread_info();
+		if (info->terminateHandler)
+		{
+			return info->terminateHandler;
+		}
+		return terminateHandler;
+	}
 }