summaryrefslogtreecommitdiff
path: root/RealtimeSync
diff options
context:
space:
mode:
Diffstat (limited to 'RealtimeSync')
-rw-r--r--RealtimeSync/application.cpp17
-rw-r--r--RealtimeSync/main_dlg.cpp2
-rw-r--r--RealtimeSync/resources.h6
3 files changed, 10 insertions, 15 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
}
diff --git a/RealtimeSync/main_dlg.cpp b/RealtimeSync/main_dlg.cpp
index 7eb3be59..7c2c9f69 100644
--- a/RealtimeSync/main_dlg.cpp
+++ b/RealtimeSync/main_dlg.cpp
@@ -286,7 +286,7 @@ xmlAccess::XmlRealConfig MainDialog::getConfiguration()
output.directories.push_back((*i)->getName());
output.commandline = m_textCtrlCommand->GetValue();
- output.delay = m_spinCtrlDelay->GetValue();;
+ output.delay = m_spinCtrlDelay->GetValue();
return output;
}
diff --git a/RealtimeSync/resources.h b/RealtimeSync/resources.h
index 835125a4..7a7b1d7f 100644
--- a/RealtimeSync/resources.h
+++ b/RealtimeSync/resources.h
@@ -4,8 +4,8 @@
// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
-#ifndef RESOURCES_H_INCLUDED
-#define RESOURCES_H_INCLUDED
+#ifndef RESOURCES_H_INCLUDED_870857342085670826521345
+#define RESOURCES_H_INCLUDED_870857342085670826521345
#include <map>
#include <wx/bitmap.h>
@@ -32,4 +32,4 @@ private:
std::map<wxString, wxBitmap> bitmaps;
};
-#endif // RESOURCES_H_INCLUDED
+#endif //RESOURCES_H_INCLUDED_870857342085670826521345
bgstack15