| 19 | { |
| 20 | template <class Encoder> |
| 21 | void output(Encoder & e, std::exception const & x) |
| 22 | { |
| 23 | char const dynamic_type[] = "dynamic_type"; |
| 24 | char const what[] = "what"; |
| 25 | #ifdef BOOST_LEAF_NO_EXCEPTIONS |
| 26 | output_at(e, "<<unknown>>", dynamic_type); |
| 27 | #else |
| 28 | output_at(e, detail::demangler(typeid(x).name()).get(), dynamic_type); |
| 29 | #endif |
| 30 | if( char const * wh = x.what() ) |
| 31 | output_at(e, wh, what); |
| 32 | else |
| 33 | output_at(e, "<<nullptr>>", what); |
| 34 | } |
| 35 | |
| 36 | template <class Encoder> |
| 37 | void output(Encoder & e, std::exception_ptr const & x) |