Commit 38aaf9e0 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

cut catch-all exceptionStr overload

Summary: There are no correct uses of the catch-all overload of `folly::exceptionStr`. Every use is a bug of some kind, leading to the impression that this overload ought to be removed.

Differential Revision: D26539622

fbshipit-source-id: dc2ca0781ea02f1327a334bb1fe2e533fa46d1b3
parent a327ee8c
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <folly/CPortability.h> #include <folly/CPortability.h>
#include <folly/CppAttributes.h> #include <folly/CppAttributes.h>
#include <folly/Demangle.h>
#include <folly/functional/Invoke.h> #include <folly/functional/Invoke.h>
#include <folly/lang/Exception.h> #include <folly/lang/Exception.h>
......
...@@ -17,13 +17,8 @@ ...@@ -17,13 +17,8 @@
#pragma once #pragma once
#include <exception> #include <exception>
#include <string>
#include <type_traits>
#include <typeinfo>
#include <folly/Demangle.h>
#include <folly/FBString.h> #include <folly/FBString.h>
#include <folly/Portability.h>
namespace folly { namespace folly {
...@@ -35,15 +30,4 @@ fbstring exceptionStr(const std::exception& e); ...@@ -35,15 +30,4 @@ fbstring exceptionStr(const std::exception& e);
fbstring exceptionStr(std::exception_ptr ep); fbstring exceptionStr(std::exception_ptr ep);
template <typename E>
auto exceptionStr(const E& e) -> typename std::
enable_if<!std::is_base_of<std::exception, E>::value, fbstring>::type {
#if FOLLY_HAS_RTTI
return demangle(typeid(e));
#else
(void)e;
return "Exception (no RTTI available)";
#endif
}
} // namespace folly } // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment