mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[pykd] added : lost dbgexcept.cpp file
git-svn-id: https://pykd.svn.codeplex.com/svn@65724 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
a1f173a193
commit
c90d280a94
41
pykd/dbgexcept.cpp
Normal file
41
pykd/dbgexcept.cpp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "dbgexcept.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// òèïû èñêëþ÷åíèé
|
||||||
|
|
||||||
|
PyObject *baseExceptionType = NULL;
|
||||||
|
PyObject *typeExceptionType = NULL;
|
||||||
|
PyObject *memoryExceptionType = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void DbgException::exceptionTranslate( const DbgException &e )
|
||||||
|
{
|
||||||
|
boost::python::object pyExcept(e);
|
||||||
|
|
||||||
|
PyErr_SetObject( baseExceptionType, pyExcept.ptr());
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void TypeException::exceptionTranslate( const TypeException &e )
|
||||||
|
{
|
||||||
|
boost::python::object pyExcept(e);
|
||||||
|
|
||||||
|
PyErr_SetObject( typeExceptionType, pyExcept.ptr());
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void MemoryException::translate( const MemoryException &e )
|
||||||
|
{
|
||||||
|
boost::python::object pyExcept(e);
|
||||||
|
|
||||||
|
PyErr_SetObject( memoryExceptionType, pyExcept.ptr());
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
Loading…
Reference in New Issue
Block a user