📄 exceptionwrapper.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -