#include <PVLE/Export.h>
#include <PVLE/Config.h>
#include <exception>
#include <stdexcept>
#include <string>
#include <PVLE/Util/Log.h>
#include <boost/format.hpp>
#include <signal.h>
Go to the source code of this file.
Classes | |
class | TracedException |
Base exception class of the generic generic Pro-Vocation Exception. More... | |
Defines | |
#define | INIT_TRACED_EXCEPTIONS |
#define | THROW_TRACED_EXCEPTION(Reason) throw TracedException(Reason, __PVLE_METHOD__) |
Macro to throw a generic Pro-Vocation Exception. | |
#define | THROW_TRACED_FMT_EXCEPTION(Reason, Args) throw TracedException( boost::format(Reason) % Args, __PVLE_METHOD__) |
Macro to throw a generic Pro-Vocation Exception with formated text (usage THROW_TRACED_FMT_EXCEPTION("this is %1% %2%", 1 % "exemple" ) ). | |
#define | THROW_TRACED_EXCEPTION_FROM(Reason, FunctionName) throw TracedException(Reason, FunctionName) |
Macro to throw a generic Pro-Vocation Exception from a function lacking of try-catch blocks. | |
#define | THROW_TRACED_FMT_EXCEPTION_FROM(Reason, FunctionName, Args) throw TracedException( boost::format(Reason) % Args, FunctionName) |
Combination of THROW_TRACED_FMT_EXCEPTION and THROW_TRACED_EXCEPTION_FROM. | |
#define | CATCH_TRACED_EXCEPTION_FROM(FunctionName) |
Macro to install generic Pro-Vocation Exception handler, with specified function name. | |
#define | CATCH_TRACED_EXCEPTION CATCH_TRACED_EXCEPTION_FROM(__PVLE_METHOD__) |
Macro to install generic Pro-Vocation Exception handler. | |
#define | TRY_BLOCK_START try { |
Macro to use at the begining and end of guarded functions. | |
#define | CATCH_CUSTOM_EXCEPTION(FilterName) } catch(FilterName) { |
#define | TRY_BLOCK_END } CATCH_TRACED_EXCEPTION |
#define | TRY_BLOCK_END_FROM(FunctionName) } CATCH_TRACED_EXCEPTION(FunctionName) |
#define | DBG_TRY_BLOCK_START ((void)0); |
#define | DBG_CATCH_CUSTOM_EXCEPTION(FilterName) ((void)0); |
#define | DBG_TRY_BLOCK_END ((void)0); |
#define | DBG_TRY_BLOCK_END_FROM(FunctionName) ((void)0); |
Definition in file TracedException.h.
#define CATCH_CUSTOM_EXCEPTION | ( | FilterName | ) | } catch(FilterName) { |
Definition at line 273 of file TracedException.h.
#define CATCH_TRACED_EXCEPTION CATCH_TRACED_EXCEPTION_FROM(__PVLE_METHOD__) |
Macro to install generic Pro-Vocation Exception handler.
Definition at line 268 of file TracedException.h.
#define CATCH_TRACED_EXCEPTION_FROM | ( | FunctionName | ) |
Value:
catch( TracedException &e ) { e.UpdateFunctionStack(FunctionName); throw e; } \ catch( std::exception &e ) { throw TracedException(e.what(), FunctionName); } \ catch( std::string &e ) { throw TracedException(e , FunctionName); } \ catch( char * e ) { throw TracedException(e , FunctionName); } \ catch(...) { throw TracedException("Undefined Exception", FunctionName); }
Definition at line 261 of file TracedException.h.
#define DBG_CATCH_CUSTOM_EXCEPTION | ( | FilterName | ) | ((void)0); |
Definition at line 286 of file TracedException.h.
#define DBG_TRY_BLOCK_END ((void)0); |
Definition at line 287 of file TracedException.h.
Referenced by Physics::Joint::copyParameters(), ControlMapper::handle(), loadBindings(), Physics::NearCallback::operator()(), ControlMapper::processHandlerLists(), Physics::World::resetSpaceCollideFlag(), saveBindings(), Physics::World::spaceCollide(), Physics::World::spaceCollide2(), and Physics::World::step().
#define DBG_TRY_BLOCK_END_FROM | ( | FunctionName | ) | ((void)0); |
Definition at line 288 of file TracedException.h.
#define DBG_TRY_BLOCK_START ((void)0); |
Definition at line 285 of file TracedException.h.
Referenced by Physics::Joint::copyParameters(), ControlMapper::handle(), loadBindings(), Physics::NearCallback::operator()(), ControlMapper::processHandlerLists(), Physics::World::resetSpaceCollideFlag(), saveBindings(), Physics::World::spaceCollide(), Physics::World::spaceCollide2(), and Physics::World::step().
#define INIT_TRACED_EXCEPTIONS |
Value:
signal(SIGSEGV,TracedException::SignalHandler); \ signal(SIGILL,TracedException::SignalHandler); \ signal(SIGFPE,TracedException::SignalHandler);
Definition at line 241 of file TracedException.h.
#define THROW_TRACED_EXCEPTION | ( | Reason | ) | throw TracedException(Reason, __PVLE_METHOD__) |
Macro to throw a generic Pro-Vocation Exception.
Definition at line 248 of file TracedException.h.
Referenced by C3DPhyOwner::addInScene(), Physics::MeshHandler::clone(), Physics::Joint::copyParameters(), Physics::MeshHandler::create(), Physics::Joint::getODEGetParamFuncPt(), Physics::Joint::getODESetParamFuncPt(), C3DPhy::getReferenceFrameObject(), LightSourceManager::getUser(), Physics::MeshHandler::indexByType(), Physics::Joint::init(), C3DPhy::isHitBy(), Physics::Joint::Joint(), Physics::Mass::Mass(), Physics::SurfaceParams::mergeInto(), Physics::MeshHandler::MeshHandler(), Physics::World::ODEHolder::ODEHolder(), PhysicsDebugUpdateCB::operator()(), readHeightMap(), osgDB::readImageFile(), osgDB::readNodeFile(), LightSourceManager::remove(), ControlMapper::replaceHandler(), Physics::Joint::rotate(), Physics::Joint::translate(), osgDB::writeImageFile(), osgDB::writeNodeFile(), and C3DPhy::~C3DPhy().
#define THROW_TRACED_EXCEPTION_FROM | ( | Reason, | |||
FunctionName | ) | throw TracedException(Reason, FunctionName) |
Macro to throw a generic Pro-Vocation Exception from a function lacking of try-catch blocks.
Definition at line 254 of file TracedException.h.
#define THROW_TRACED_FMT_EXCEPTION | ( | Reason, | |||
Args | ) | throw TracedException( boost::format(Reason) % Args, __PVLE_METHOD__) |
Macro to throw a generic Pro-Vocation Exception with formated text (usage THROW_TRACED_FMT_EXCEPTION("this is %1% %2%", 1 % "exemple" ) ).
Definition at line 251 of file TracedException.h.
Referenced by ControlMapper::getHandlerList(), Util::DG< T >::operator()(), and readHeightMap().
#define THROW_TRACED_FMT_EXCEPTION_FROM | ( | Reason, | |||
FunctionName, | |||||
Args | ) | throw TracedException( boost::format(Reason) % Args, FunctionName) |
Combination of THROW_TRACED_FMT_EXCEPTION and THROW_TRACED_EXCEPTION_FROM.
Definition at line 257 of file TracedException.h.
#define TRY_BLOCK_END } CATCH_TRACED_EXCEPTION |
Definition at line 274 of file TracedException.h.
#define TRY_BLOCK_END_FROM | ( | FunctionName | ) | } CATCH_TRACED_EXCEPTION(FunctionName) |
Definition at line 275 of file TracedException.h.
#define TRY_BLOCK_START try { |
Macro to use at the begining and end of guarded functions.
Definition at line 272 of file TracedException.h.