0

Is it possible to get boost::exception object from boost::exception_ptr? If yes How (in boost version 1.5x)?

  • Do you mean something like try { rethrow_exception(eptr); } catch(const exception &e) { /* you now have the original exception */ }? – Niall Douglas Jan 27 '16 at 17:20
  • No. I want to access the actual pointer or address of the object which boost::exception_ptr holding inside. – Jyotideep Bhuyan Jan 28 '16 at 03:25
  • There is no official access to that. – Niall Douglas Jan 28 '16 at 14:45
  • If you know that the exception object derives from boost::exception, if you rethrow_exception(eptr) you can catch it as boost::exception &. The reference you'll get will refer to the actual object the exception_ptr holds. – Emil Dec 19 '16 at 21:01

0 Answers0