OGRE  1.10.12
Object-Oriented Graphics Rendering Engine
OgreException.h File Reference
#include "OgrePrerequisites.h"
#include "OgreString.h"
#include <exception>
#include "OgreHeaderPrefix.h"
#include "OgreHeaderSuffix.h"

Classes

class  Ogre::Exception
 When thrown, provides information about an error that has occurred inside the engine. More...
 
class  Ogre::ExceptionFactory
 Class implementing dispatch methods in order to construct by-value exceptions of a derived type based just on an exception code. More...
 
class  Ogre::FileNotFoundException
 
class  Ogre::InternalErrorException
 
class  Ogre::InvalidCallException
 
class  Ogre::InvalidParametersException
 
class  Ogre::InvalidStateException
 
class  Ogre::IOException
 
class  Ogre::ItemIdentityException
 
class  Ogre::RenderingAPIException
 
class  Ogre::RuntimeAssertionException
 
class  Ogre::UnimplementedException
 Template struct which creates a distinct type for each exception code. More...
 

Namespaces

 Ogre
 

This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/

 

Macros

#define OGRE_EXCEPT(code, desc, src)   Ogre::ExceptionFactory::throwException(code, desc, src, __FILE__, __LINE__)
 
#define OGRE_EXCEPT_EX(code, num, desc, src)   Ogre::ExceptionFactory::throwExceptionEx(code, num, desc, src, __FILE__, __LINE__)
 
#define OgreAssert(expr, mesg)   assert( (expr) && (mesg) )
 Checks a condition at runtime and throws exception/ aborts if it fails. More...
 
#define OgreAssertDbg(expr, mesg)
 replaced with OgreAssert(expr, mesg) in Debug configuration More...
 

Macro Definition Documentation

◆ OgreAssert

#define OgreAssert (   expr,
  mesg 
)    assert( (expr) && (mesg) )

Checks a condition at runtime and throws exception/ aborts if it fails.

The macros OgreAssert (and OgreAssertDbg) evaluate the specified expression. If it is 0, OgreAssert raises an error (see Ogre::RuntimeAssertionException) in Release configuration and aborts in Debug configuration. The macro OgreAssert checks the condition in both Debug and Release configurations while OgreAssertDbg is only retained in the Debug configuration.

To always abort instead of throwing an exception or disabling OgreAssert in Release configuration altogether, set OGRE_ASSERT_MODE in CMake accordingly.

Referenced by OgreBites::ApplicationContext::addInputListener(), OgreBites::ApplicationContext::removeInputListener(), and OgreBites::ApplicationContext::setWindowGrab().

◆ OgreAssertDbg