Boost logo

Boost :

From: rajesh daggumati (rajeshdaggumati9999_at_[hidden])
Date: 2021-09-29 10:24:35

HI Team,
// i have caught exception in exception_ptr and I and trying to convert to
ExceptionPtr_t but I am facing issue at below derived->severity().
* unknown file: error: SEH exception with code 0xc0000005 thrown in the
test body.*

*code snippet is :*
*E*xceptionPtr_t ExceptionHelper::TryGetExceptionPtr(boost::exception_ptr
ExceptionPtr_t result ;
std::string res;
if(!exception) return result;
*}catch(boost::exception &e)*

*{boost::throw_file::value_type const* throw_file_data =
*if(* *throw_file_data)*
* result = exceptionPtr_t(new
*return result;*


class Exception : public virtual std::exception, public virtual
     string what;
    serviorytype m_severity;
explicit Exception(const std::string& what);
virtual ~Exception() throw() {}
     // we have some member functions like severity(),setseverity(value)...
class ExceptionWrapper : public Exception
    string m_what_inner;
    boost::exception_ptr m_inner;
   explict ExceptionWrapper(boost::exception_ptr inner,string &what() =
std::string,bool copythrow = true);
  explict ExceptionWrapper(boost::exceptionPtr_t inner,string &what() =
std::string,bool copythrow = true);
 virtual ~ExceptionWrapper() throw(){}
// some methods like severity(),setSeverity(value),.....)

I was doing like:

const Exception* derived = reinterPret_cast<const Exception*>
(&exception)// here exception is type of exception_ptr
  derived->severity(); // here exception is coming... if i put this
line in try block then its going for catch block and new exception is
being rasied. if i dont put try
block then *unknown file: error: SEH exception with code 0xc0000005 thrown
in the test body.*

Please help me to resolve this issue

Boost list run by bdawes at, gregod at, cpdaniel at, john at