exceptionwrapper.h
来自「使用stl技术,(还没看,是听说的)」· C头文件 代码 · 共 30 行
H
30 行
#ifndef PYOGRE_EXCEPTIONWRAPPER_H_INCLUDED
# define PYOGRE_EXCEPTIONWRAPPER_H_INCLUDED
#include <boost/python.hpp>
#include <OgreException.h>
using namespace boost::python;
inline void ogreExceptionTranslator(const Ogre::Exception& exception)
{
PyErr_SetString(PyExc_UserWarning, exception.getFullDescription());
}
inline void error_already_setTranslator(const error_already_set&)
{
PyErr_Print();
}
inline void register_ogre_ExceptionWrapper()
{
register_exception_translator<Ogre::Exception>(ogreExceptionTranslator);
//register_exception_translator<error_already_set>(error_already_setTranslator);
}
#endif // PYOGRE_EXCEPTIONWRAPPER_H_INCLUDED
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?