diff options
Diffstat (limited to 'ui/gui_status_handler.cpp')
-rw-r--r-- | ui/gui_status_handler.cpp | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/ui/gui_status_handler.cpp b/ui/gui_status_handler.cpp index 57785403..b25e4249 100644 --- a/ui/gui_status_handler.cpp +++ b/ui/gui_status_handler.cpp @@ -279,37 +279,38 @@ void SyncStatusHandler::reportInfo(const std::wstring& text) ProcessCallback::Response SyncStatusHandler::reportError(const std::wstring& errorMessage) { + errorLog.logMsg(errorMessage, TYPE_ERROR); //always, even for "retry" + switch (handleError_) { case ON_GUIERROR_POPUP: - break; - case ON_GUIERROR_IGNORE: - errorLog.logMsg(errorMessage, TYPE_ERROR); - return ProcessCallback::IGNORE_ERROR; - } + { + PauseTimers dummy(syncStatusFrame); + forceUiRefresh(); - PauseTimers dummy(syncStatusFrame); - forceUiRefresh(); + bool ignoreNextErrors = false; + switch (showErrorDlg(parentDlg_, + ReturnErrorDlg::BUTTON_IGNORE | ReturnErrorDlg::BUTTON_RETRY | ReturnErrorDlg::BUTTON_CANCEL, + errorMessage, + &ignoreNextErrors)) + { + case ReturnErrorDlg::BUTTON_IGNORE: + if (ignoreNextErrors) //falsify only + handleError_ = ON_GUIERROR_IGNORE; + return ProcessCallback::IGNORE_ERROR; - bool ignoreNextErrors = false; - switch (showErrorDlg(parentDlg_, - ReturnErrorDlg::BUTTON_IGNORE | ReturnErrorDlg::BUTTON_RETRY | ReturnErrorDlg::BUTTON_CANCEL, - errorMessage, - &ignoreNextErrors)) - { - case ReturnErrorDlg::BUTTON_IGNORE: - if (ignoreNextErrors) //falsify only - handleError_ = ON_GUIERROR_IGNORE; - errorLog.logMsg(errorMessage, TYPE_ERROR); - return ProcessCallback::IGNORE_ERROR; + case ReturnErrorDlg::BUTTON_RETRY: + return ProcessCallback::RETRY; - case ReturnErrorDlg::BUTTON_RETRY: - return ProcessCallback::RETRY; + case ReturnErrorDlg::BUTTON_CANCEL: + abortThisProcess(); + break; + } + } + break; - case ReturnErrorDlg::BUTTON_CANCEL: - errorLog.logMsg(errorMessage, TYPE_ERROR); - abortThisProcess(); - break; + case ON_GUIERROR_IGNORE: + return ProcessCallback::IGNORE_ERROR; } assert(false); |