⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exceptionwrapper.h

📁 使用stl技术,(还没看,是听说的)
💻 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 + -