diff --git a/pykd/dbgexcept.cpp b/pykd/dbgexcept.cpp index c50ca12..d557cd4 100644 --- a/pykd/dbgexcept.cpp +++ b/pykd/dbgexcept.cpp @@ -28,6 +28,16 @@ void MemoryException::exceptionTranslate( const MemoryException &e ) ///////////////////////////////////////////////////////////////////////////////// +std::string buildExceptDesc(PCSTR routineName, HRESULT hres) +{ + std::stringstream sstream; + sstream << "Call " << routineName << " failed\n"; + sstream << "HRESULT 0x" << std::hex << hres; + return sstream.str(); +} + +///////////////////////////////////////////////////////////////////////////////// + }; // end namespace pykd diff --git a/pykd/dbgexcept.h b/pykd/dbgexcept.h index 846dd4f..f5033ea 100644 --- a/pykd/dbgexcept.h +++ b/pykd/dbgexcept.h @@ -113,6 +113,8 @@ private: }; }; +std::string buildExceptDesc(PCSTR routineName, HRESULT hres); + ///////////////////////////////////////////////////////////////////////////////////