#if CATCH_UNHANDLED_EXCEPTIONS == 1
#define BEGIN_DEBUG_EXCEPTION_HANDLER try {
- #define END_DEBUG_EXCEPTION_HANDLER(logstream) \
- } catch (std::exception &e) { \
- logstream << "An unhandled exception occurred: " \
- << e.what() << std::endl; \
- FATAL_ERROR(e.what()); \
+ #define END_DEBUG_EXCEPTION_HANDLER \
+ } catch (std::exception &e) { \
+ errorstream << "An unhandled exception occurred: " \
+ << e.what() << std::endl; \
+ FATAL_ERROR(e.what()); \
}
#else
// Dummy ones
#define BEGIN_DEBUG_EXCEPTION_HANDLER
- #define END_DEBUG_EXCEPTION_HANDLER(logstream)
+ #define END_DEBUG_EXCEPTION_HANDLER
#endif
#endif // DEBUG_HEADER
m_server->setAsyncFatalError(err.str());
}
- END_DEBUG_EXCEPTION_HANDLER(errorstream)
+ END_DEBUG_EXCEPTION_HANDLER
return NULL;
}
else
waitForIO(100);
- END_DEBUG_EXCEPTION_HANDLER(errorstream)
+ END_DEBUG_EXCEPTION_HANDLER
}
// Call curl_multi_remove_handle and cleanup easy handles
// Stop httpfetch thread (if started)
httpfetch_cleanup();
- END_DEBUG_EXCEPTION_HANDLER(errorstream);
+ END_DEBUG_EXCEPTION_HANDLER
return retval;
}
/* send non reliable packets */
sendPackets(dtime);
- END_DEBUG_EXCEPTION_HANDLER(errorstream);
+ END_DEBUG_EXCEPTION_HANDLER
}
PROFILE(g_profiler->remove(ThreadIdentifier.str()));
}
}
#endif
- END_DEBUG_EXCEPTION_HANDLER(errorstream);
+ END_DEBUG_EXCEPTION_HANDLER
}
PROFILE(g_profiler->remove(ThreadIdentifier.str()));
}
}
- END_DEBUG_EXCEPTION_HANDLER(errorstream)
+ END_DEBUG_EXCEPTION_HANDLER
return NULL;
}
doUpdate();
}
- END_DEBUG_EXCEPTION_HANDLER(errorstream)
+ END_DEBUG_EXCEPTION_HANDLER
return NULL;
}