int main(int argc, char *argv[])
{
- // Output on stdout will be flushed after every newline character,
- // even if it is redirected to a pipe. This is useful for running
- // from a script and parsing output.
- // (Standard behavior of stdlib is to use full buffering when
- // redirected to a pipe, which means even after an end of line
- // the output may not be flushed).
- setlinebuf(stdout);
-
- DPL::Log::LogSystemSingleton::Instance().SetTag("WRT-POPUP");
- Wrt::Popup::WrtPopup app(argc, argv);
- int ret = app.Exec();
- LogDebug("App returned: " << ret);
- return ret;
+ UNHANDLED_EXCEPTION_HANDLER_BEGIN
+ {
+ // Output on stdout will be flushed after every newline character,
+ // even if it is redirected to a pipe. This is useful for running
+ // from a script and parsing output.
+ // (Standard behavior of stdlib is to use full buffering when
+ // redirected to a pipe, which means even after an end of line
+ // the output may not be flushed).
+ setlinebuf(stdout);
+
+ DPL::Log::LogSystemSingleton::Instance().SetTag("WRT-POPUP");
+ Wrt::Popup::WrtPopup app(argc, argv);
+ int ret = app.Exec();
+ LogDebug("App returned: " << ret);
+ return ret;
+ }
+ UNHANDLED_EXCEPTION_HANDLER_END
}