]> git.tdb.fi Git - libs/core.git/blob - source/core/android/errorlogger.cpp
Make sure all classes have sensible copy semantics
[libs/core.git] / source / core / android / errorlogger.cpp
1 #include <typeinfo>
2 #include <android/log.h>
3 #include <msp/debug/demangle.h>
4 #include "errorlogger.h"
5
6 using namespace std;
7
8 namespace Msp {
9 namespace Android {
10
11 bool ErrorLogger::report_uncaught_exception(const exception &e) const
12 {
13         __android_log_write(ANDROID_LOG_ERROR, "Msp", "An uncaught exception occurred.");
14         __android_log_print(ANDROID_LOG_ERROR, "Msp", "  type:   %s", Debug::demangle(typeid(e).name()).c_str());
15         __android_log_print(ANDROID_LOG_ERROR, "Msp", "  what(): %s", e.what());
16         return true;
17 }
18
19 } // namespace Android
20 } // namespace Msp