summaryrefslogtreecommitdiff
path: root/lib/status_handler_impl.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:29:28 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:29:28 +0200
commit75c07011b7c4d06acd7b45dabdcd60ab9d80f385 (patch)
tree8853c3978dd152ef377e652239448b1352320206 /lib/status_handler_impl.h
parent5.22 (diff)
downloadFreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.tar.gz
FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.tar.bz2
FreeFileSync-75c07011b7c4d06acd7b45dabdcd60ab9d80f385.zip
5.23
Diffstat (limited to 'lib/status_handler_impl.h')
-rw-r--r--lib/status_handler_impl.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/status_handler_impl.h b/lib/status_handler_impl.h
deleted file mode 100644
index 210e6ecd..00000000
--- a/lib/status_handler_impl.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// **************************************************************************
-// * This file is part of the FreeFileSync project. It is distributed under *
-// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
-// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
-// **************************************************************************
-
-#ifndef STATUSHANDLER_IMPL_H_INCLUDED
-#define STATUSHANDLER_IMPL_H_INCLUDED
-
-#include <zen/optional.h>
-#include <zen/file_error.h>
-#include "process_callback.h"
-
-
-template <typename Function> inline
-zen::Opt<std::wstring> tryReportingError(Function cmd, ProcessCallback& handler) //return ignored error message if available
-{
- for (size_t retryNumber = 0;; ++retryNumber)
- try
- {
- cmd(); //throw FileError
- return zen::NoValue();
- }
- catch (zen::FileError& error)
- {
- switch (handler.reportError(error.toString(), retryNumber)) //may throw!
- {
- case ProcessCallback::IGNORE_ERROR:
- return error.toString();
- case ProcessCallback::RETRY:
- break; //continue with loop
- }
- }
-}
-
-
-#endif //STATUSHANDLER_IMPL_H_INCLUDED
bgstack15