diff options
Diffstat (limited to 'FreeFileSync/Source/RealTimeSync/application.cpp')
-rw-r--r-- | FreeFileSync/Source/RealTimeSync/application.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/FreeFileSync/Source/RealTimeSync/application.cpp b/FreeFileSync/Source/RealTimeSync/application.cpp index 80760349..7a058714 100644 --- a/FreeFileSync/Source/RealTimeSync/application.cpp +++ b/FreeFileSync/Source/RealTimeSync/application.cpp @@ -41,7 +41,7 @@ void notifyAppError(const std::wstring& msg, FfsExitCode rc) { //raiseExitCode(exitCode_, rc); - const std::wstring msgTypeName = [&] + const std::wstring msgType = [&] { switch (rc) { @@ -56,16 +56,12 @@ void notifyAppError(const std::wstring& msg, FfsExitCode rc) assert(false); return std::wstring{}; }(); - const std::wstring title = copyStringTo<std::wstring>(wxTheApp->GetAppDisplayName()) + - (msgTypeName.empty() ? L"" : SPACED_DASH + msgTypeName); - //error handling strategy unknown and no sync log output available at this point! - std::cerr << '[' + utfTo<std::string>(title) + "] " + utfTo<std::string>(msg) + '\n'; + std::cerr << utfTo<std::string>(msgType + L": " + msg) + '\n'; //alternative0: std::wcerr: cannot display non-ASCII at all, so why does it exist??? //alternative1: wxSafeShowMessage => NO console output on Debian x86, WTF! //alternative2: wxMessageBox() => works, but we probably shouldn't block during command line usage } - } @@ -192,7 +188,7 @@ void Application::onEnterEventLoop(wxEvent& event) endsWithAsciiNoCase(filePath, Zstr(".ffs_batch"))) commandArgs.push_back(filePath); else - throw FileError(replaceCpy(_("File %x does not contain a valid configuration."), L"%x", fmtPath(filePath)), + throw FileError(replaceCpy(_("Cannot open file %x."), L"%x", fmtPath(filePath)), _("Unexpected file extension:") + L' ' + fmtPath(getFileExtension(filePath))); } @@ -204,7 +200,7 @@ void Application::onEnterEventLoop(wxEvent& event) } catch (const FileError& e) { - notifyAppError(e.toString(), FfsExitCode::aborted); + notifyAppError(e.toString(), FfsExitCode::exception); } } |