summaryrefslogtreecommitdiff
path: root/RealtimeSync/application.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:50 +0200
commit7e706cf64654aea466c059c307e5723e2423ed5d (patch)
treee85f0d28d7c81b6d21419fc38e1a654cca2212b1 /RealtimeSync/application.cpp
parent5.5 (diff)
downloadFreeFileSync-7e706cf64654aea466c059c307e5723e2423ed5d.tar.gz
FreeFileSync-7e706cf64654aea466c059c307e5723e2423ed5d.tar.bz2
FreeFileSync-7e706cf64654aea466c059c307e5723e2423ed5d.zip
5.6
Diffstat (limited to 'RealtimeSync/application.cpp')
-rw-r--r--RealtimeSync/application.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/RealtimeSync/application.cpp b/RealtimeSync/application.cpp
index b136b720..dae44de4 100644
--- a/RealtimeSync/application.cpp
+++ b/RealtimeSync/application.cpp
@@ -9,13 +9,13 @@
#include <wx/event.h>
#include <wx/log.h>
#include <wx/msgdlg.h>
-#include <wx+/serialize.h>
#include <wx+/string_conv.h>
-#include <zen/file_handling.h>
#include "resources.h"
#include "xml_ffs.h"
#include "../lib/localization.h"
#include "../lib/ffs_paths.h"
+#include "../lib/return_codes.h"
+#include "lib/error_log.h"
#ifdef FFS_LINUX
#include <gtk/gtk.h>
@@ -101,12 +101,7 @@ int Application::OnRun()
auto processException = [](const std::wstring& msg)
{
//it's not always possible to display a message box, e.g. corrupted stack, however low-level file output works!
- try
- {
- saveBinStream(getConfigDir() + Zstr("LastError.txt"), utfCvrtTo<std::string>(msg)); //throw FileError
- }
- catch (const FileError&) {}
-
+ logError(utfCvrtTo<std::string>(msg));
wxSafeShowMessage(_("An exception occurred!") + L" - FFS", msg);
};
@@ -117,14 +112,14 @@ int Application::OnRun()
catch (const std::exception& e) //catch all STL exceptions
{
processException(utfCvrtTo<std::wstring>(e.what()));
- return -9;
+ return FFS_RC_EXCEPTION;
}
catch (...) //catch the rest
{
processException(L"Unknown error.");
- return -9;
+ return FFS_RC_EXCEPTION;
}
- return 0; //program's return code
+ return FFS_RC_SUCCESS; //program's return code
}
bgstack15