Add coffeecatch to Map::run()

This commit is contained in:
Leith Bade
2014-11-16 20:04:36 +11:00
parent b216b04a59
commit 2aed807d4c
2 changed files with 17 additions and 1 deletions

View File

@@ -31,6 +31,10 @@
#include <uv.h>
#ifdef __ANDROID__
#include <coffeecatch/coffeecatch.h>
#endif
// Check libuv library version.
const static bool uv_version_check = []() {
const unsigned int version = uv_version();
@@ -251,6 +255,10 @@ void Map::resume() {
}
void Map::run() {
#ifdef __ANDROID__
COFFEE_TRY() {
#endif
#ifndef NDEBUG
if (!async) {
map_thread = main_thread;
@@ -280,6 +288,12 @@ void Map::run() {
map_thread = -1;
#endif
}
#ifdef __ANDROID__
} COFFEE_CATCH() {
Log::Error(Event::Crash, "Map::run() crash:\n%s", coffeecatch_get_message());
abort();
}
#endif
}
void Map::check_for_pause() {