26 template <
typename Ex>
28 auto const name = __PRETTY_FUNCTION__;
35 return epos < bpos ?
"" :
std::string(bpos, epos - bpos);
38 template <
typename Ex>
40 auto const name = type_pretty_name<Ex>();
42 std::string(
"terminate called after throwing an instance of ");
67 : what_(what + strip) {}
78 folly::throw_exception<MyException>(
"hello world");
87 folly::throw_exception<MyException>(
"hello world", 6);
96 folly::terminate_with<MyException>(
"hello world"),
97 message_for_terminate_with<MyException>(
"hello world"));
102 folly::terminate_with<MyException>(
"hello world", 6),
103 message_for_terminate_with<MyException>(
"world"));
#define EXPECT_THROW(statement, expected_exception)
requires E e noexcept(noexcept(s.error(std::move(e))))
bool prefix(Cursor &c, uint32_t expected)
MyException(char const *const what, std::size_t const strip)
FOLLY_NOINLINE FOLLY_COLD void invoke_noreturn_cold(F &&f, A &&...a)
TEST_F(ExceptionTest, throw_exception_direct)
#define EXPECT_STREQ(s1, s2)
std::uint64_t strip(std::chrono::nanoseconds t)
constexpr auto size(C const &c) -> decltype(c.size())
MyException(char const *const what)
static std::string message_for_terminate_with(std::string const &what)
char const * what() const noexceptoverride
constexpr auto kIsGlibcxx
static std::string message_for_terminate()
static std::string type_pretty_name()