mirror of
https://github.com/QuasarApp/backward-cpp.git
synced 2025-05-08 15:59:33 +00:00
(Cosmetic) move helpers functions all together
This commit is contained in:
parent
a69e228791
commit
c3dd434ec8
14
backward.hpp
14
backward.hpp
@ -2067,11 +2067,6 @@ public:
|
|||||||
virtual void rethrow() const { throw static_cast<const E&>(*this); }
|
virtual void rethrow() const { throw static_cast<const E&>(*this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename E>
|
|
||||||
inline void raise(const E& e) {
|
|
||||||
throw exception_with_st_mixin<E>(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
class ExceptionHandling {
|
class ExceptionHandling {
|
||||||
public:
|
public:
|
||||||
static ExceptionHandling& instance() {
|
static ExceptionHandling& instance() {
|
||||||
@ -2226,13 +2221,20 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*************** HELPERS FUNCTIONS **************/
|
||||||
|
|
||||||
|
template <typename E>
|
||||||
|
inline void raise(const E& e) {
|
||||||
|
throw exception_with_st_mixin<E>(e);
|
||||||
|
}
|
||||||
|
|
||||||
inline void pprint_current_exception() {
|
inline void pprint_current_exception() {
|
||||||
ExceptionHandling::pprint_current_exception();
|
ExceptionHandling::pprint_current_exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BACKWARD_ATLEAST_CXX11
|
#ifdef BACKWARD_ATLEAST_CXX11
|
||||||
inline void pprint_exception(const std::exception_ptr& e) {
|
inline void pprint_exception(const std::exception_ptr& e) {
|
||||||
try {
|
try {
|
||||||
std::rethrow_exception(e);
|
std::rethrow_exception(e);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
pprint_current_exception();
|
pprint_current_exception();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user