# Ogre::ExceptionFactory Class Reference

Class implementing dispatch methods in order to construct by-value exceptions of a derived type based just on an exception code. More...

`#include <OgreException.h>`

List of all members.

## Static Public Member Functions

static UnimplementedException | create (ExceptionCodeType< Exception::ERR_NOT_IMPLEMENTED > code, const String &desc, const String &src, const char *file, long line)
static FileNotFoundException | create (ExceptionCodeType< Exception::ERR_FILE_NOT_FOUND > code, const String &desc, const String &src, const char *file, long line)
static IOException | create (ExceptionCodeType< Exception::ERR_CANNOT_WRITE_TO_FILE > code, const String &desc, const String &src, const char *file, long line)
static InvalidStateException | create (ExceptionCodeType< Exception::ERR_INVALID_STATE > code, const String &desc, const String &src, const char *file, long line)
static InvalidParametersException | create (ExceptionCodeType< Exception::ERR_INVALIDPARAMS > code, const String &desc, const String &src, const char *file, long line)
static ItemIdentityException | create (ExceptionCodeType< Exception::ERR_ITEM_NOT_FOUND > code, const String &desc, const String &src, const char *file, long line)
static ItemIdentityException | create (ExceptionCodeType< Exception::ERR_DUPLICATE_ITEM > code, const String &desc, const String &src, const char *file, long line)
static InternalErrorException | create (ExceptionCodeType< Exception::ERR_INTERNAL_ERROR > code, const String &desc, const String &src, const char *file, long line)
static RenderingAPIException | create (ExceptionCodeType< Exception::ERR_RENDERINGAPI_ERROR > code, const String &desc, const String &src, const char *file, long line)
static RuntimeAssertionException | create (ExceptionCodeType< Exception::ERR_RT_ASSERTION_FAILED > code, const String &desc, const String &src, const char *file, long line)

## Private Member Functions

| ExceptionFactory ()
| Private constructor, no construction.

## Detailed Description

Class implementing dispatch methods in order to construct by-value exceptions of a derived type based just on an exception code.

Remarks:
  This nicely handles construction of derived Exceptions by value (needed for throwing) without suffering from ambiguity - each code is turned into a distinct type so that methods can be overloaded. This allows OGRE_EXCEPT to stay small in implementation (desirable since it is embedded) whilst still performing rich code-to-type mapping.

Definition at line 254 of file OgreException.h.

## Constructor & Destructor Documentation

Ogre::ExceptionFactory::ExceptionFactory | ( |  | ) | `[private]`

Private constructor, no construction.

Definition at line 258 of file OgreException.h.

## Member Function Documentation

static UnimplementedException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_NOT_IMPLEMENTED > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 260 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static FileNotFoundException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_FILE_NOT_FOUND > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 267 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static IOException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_CANNOT_WRITE_TO_FILE > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 274 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static InvalidStateException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_INVALID_STATE > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 281 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static InvalidParametersException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_INVALIDPARAMS > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 288 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static ItemIdentityException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_ITEM_NOT_FOUND > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 295 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static ItemIdentityException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_DUPLICATE_ITEM > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 302 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static InternalErrorException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_INTERNAL_ERROR > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 309 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static RenderingAPIException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_RENDERINGAPI_ERROR > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 316 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

static RuntimeAssertionException Ogre::ExceptionFactory::create | ( | ExceptionCodeType< Exception::ERR_RT_ASSERTION_FAILED > | code,
|  | const String & | desc,
|  | const String & | src,
|  | const char * | file,
|  | long | line |
| ) |  |  | `[static]`

Definition at line 323 of file OgreException.h.

References Ogre::ExceptionCodeType< num >::number.

The documentation for this class was generated from the following file:

- OgreException.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 26 11:33:13 2009