]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/utils/ErrorUtil.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / utils / ErrorUtil.h
diff --git a/ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/utils/ErrorUtil.h b/ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/utils/ErrorUtil.h
deleted file mode 100644 (file)
index d61e1c0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2017 Uber Technologies, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JAEGERTRACING_UTILS_ERRORUTIL_H
-#define JAEGERTRACING_UTILS_ERRORUTIL_H
-
-#include "jaegertracing/Logging.h"
-#include "jaegertracing/Sender.h"
-#include <sstream>
-#include <string>
-#include <system_error>
-
-namespace jaegertracing {
-namespace utils {
-namespace ErrorUtil {
-
-inline void logError(logging::Logger& logger, const std::string& message)
-{
-    try {
-        throw;
-    } catch (const Sender::Exception& ex) {
-        std::ostringstream oss;
-        oss << message << ": " << ex.what() << ", numFailed=" << ex.numFailed();
-        logger.error(oss.str());
-    } catch (const std::system_error& ex) {
-        std::ostringstream oss;
-        oss << message << ": " << ex.what() << ", code=" << ex.code().value();
-        logger.error(oss.str());
-    } catch (const std::exception& ex) {
-        std::ostringstream oss;
-        oss << message << ": " << ex.what();
-        logger.error(oss.str());
-    } catch (...) {
-        logger.error(message);
-    }
-}
-
-}  // namespace ErrorUtil
-}  // namespace utils
-}  // namespace jaegertracing
-
-#endif  // JAEGERTRACING_UTILS_ERRORUTIL_H