From c3dd434ec8c271f25e36a290ff91f838210bbe24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Bourlet?= Date: Mon, 20 Jan 2014 20:00:22 -0800 Subject: [PATCH] (Cosmetic) move helpers functions all together --- backward.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backward.hpp b/backward.hpp index 0111211..477772f 100644 --- a/backward.hpp +++ b/backward.hpp @@ -2067,11 +2067,6 @@ public: virtual void rethrow() const { throw static_cast(*this); } }; -template -inline void raise(const E& e) { - throw exception_with_st_mixin(e); -} - class ExceptionHandling { public: static ExceptionHandling& instance() { @@ -2226,13 +2221,20 @@ private: #endif }; +/*************** HELPERS FUNCTIONS **************/ + +template +inline void raise(const E& e) { + throw exception_with_st_mixin(e); +} + inline void pprint_current_exception() { ExceptionHandling::pprint_current_exception(); } #ifdef BACKWARD_ATLEAST_CXX11 inline void pprint_exception(const std::exception_ptr& e) { -try { + try { std::rethrow_exception(e); } catch (...) { pprint_current_exception();