[+] pyDia: query failed HRESULT value

git-svn-id: https://pykd.svn.codeplex.com/svn@69904 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2011-09-20 22:31:51 +00:00 committed by Mikhail I. Izmestev
parent 4ecd871b02
commit 4c40342a91

View File

@ -232,14 +232,15 @@ BOOST_PYTHON_MODULE( pykd )
.def( python::init<std::string>( python::args("desc"), "constructor" ) ) .def( python::init<std::string>( python::args("desc"), "constructor" ) )
.def( "desc", &DbgException::getDesc, .def( "desc", &DbgException::getDesc,
"Get exception description" ) "Get exception description" )
.def( "__str__", &DbgException::print); .def( "__str__", &DbgException::print);
DbgException::setTypeObject( dbgExceptionClass.ptr() ); DbgException::setTypeObject( dbgExceptionClass.ptr() );
// DIA exceptions // DIA exceptions
python::class_<pyDia::Exception, python::bases<DbgException> > diaException( python::class_<pyDia::Exception, python::bases<DbgException> > diaException(
"DiaException", "DiaException", "Debug interface access exception",
"Debug interface access exception", python::no_init );
python::no_init ); diaException
.def( "hres", &pyDia::Exception::getRes );
pyDia::Exception::setTypeObject( diaException.ptr() ); pyDia::Exception::setTypeObject( diaException.ptr() );
boost::python::register_exception_translator<pyDia::Exception>( boost::python::register_exception_translator<pyDia::Exception>(
&pyDia::Exception::exceptionTranslate ); &pyDia::Exception::exceptionTranslate );