| 69 | } |
| 70 | |
| 71 | std::string toString(std::exception_ptr ptr) { |
| 72 | if (!ptr) { |
| 73 | return "No exception"; |
| 74 | } |
| 75 | |
| 76 | try { |
| 77 | std::rethrow_exception(ptr); |
| 78 | } catch (std::exception& e) { |
| 79 | std::stringstream ss; |
| 80 | ss << typeid(e).name() << ": " << e.what(); |
| 81 | return ss.str(); |
| 82 | } catch (...) { |
| 83 | return "Unknown exception"; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | } |
| 88 | } |
no test coverage detected