#include <string>
#include <cstdio>
#include <execinfo.h>
-#include <cxxabi.h>
+
+#ifndef EMSCRIPTEN // cxxabi not supported
+# include <cxxabi.h>
+#endif
+
#include <cstring>
// INTERNAL INCLUDES
namespace Dali
{
+#ifndef EMSCRIPTEN
+
std::string Demangle(const char* symbol)
{
std::string result;
return result;
}
+#endif // EMSCRIPTEN
+
+#ifndef EMSCRIPTEN
+
DALI_EXPORT_API DaliException::DaliException(const char *location, const char* condition)
: mLocation(location), mCondition(condition)
{
free(symbols);
}
+#else
+
+DALI_EXPORT_API DaliException::DaliException(const char *location, const char* condition)
+: mLocation(location), mCondition(condition)
+{
+ printf("Exception: \n%s\n thrown at %s\nSee dlog for backtrace\n", mCondition.c_str(), mLocation.c_str());
+}
+
+#endif // EMSCRIPTEN
+
DALI_EXPORT_API void DaliAssertMessage(const char* condition, const char* file, int line)
{
DALI_LOG_ERROR_NOFN( "Assertion (%s) failed in: %s:%d\n", condition, file, line );