ParCompMark::Exception Class Reference

#include <PCMException.h>

Collaboration diagram for ParCompMark::Exception:

Collaboration graph
[legend]
List of all members.

Detailed Description

Provides information about an internal error.
Remarks:
An application using PCM that the exceptions are caught, so all PCM functions should occur within a try{} catch(PCM::Exception& e) {} block.

Definition at line 61 of file PCMException.h.


Getters & setters

const Exception::ExceptionTypegetType () const
 Getter of mType.
const std::string & getDescription () const
 Getter of mDescription.
const std::string & getFileName () const
 Getter of mFileName.
const std::string & getFunctionName () const
 Getter of mFunctionName.
const u32getLineNumber () const
 Getter of mLineNumber.
static ExceptiongetLastException ()
 Getter of mLastException.

Public Types

 INTERNAL_ERROR
 Unknown internal error (mostly occured by another library).
 NULL_POINTER_ERROR
 Nullpointer error.
 INVALID_NAME_ERROR
 Invalid name error.
 INVALID_ENUM_ERROR
 Invalid enumerated value error.
 INVALID_VALUE_ERROR
 Invalid value error.
 INVALID_OBJECT_ERROR
 Invalid object error.
 INVALID_CLASS_ERROR
 Invalid class error (not proper derived class).
 INVALID_OPERATION_ERROR
 Invalid operation error.
 OPERATION_NOT_SUPPORTED_ERROR
 Operation is not supported on this platform.
 OUT_OF_MEMORY_ERROR
 Out of memory error.
 FILE_IO_ERROR
 File I/O error.
 FILE_FORMAT_ERROR
 Invalid file format error.
 USER_BREAK_ERROR
 The user stopped the application.
 SCRIPT_ERROR
 Error in a script file.
 XLIB_ERROR
 Xlib error.
enum  ExceptionType {
  INTERNAL_ERROR, NULL_POINTER_ERROR, INVALID_NAME_ERROR, INVALID_ENUM_ERROR,
  INVALID_VALUE_ERROR, INVALID_OBJECT_ERROR, INVALID_CLASS_ERROR, INVALID_OPERATION_ERROR,
  OPERATION_NOT_SUPPORTED_ERROR, OUT_OF_MEMORY_ERROR, FILE_IO_ERROR, FILE_FORMAT_ERROR,
  USER_BREAK_ERROR, SCRIPT_ERROR, XLIB_ERROR
}
 Definitions of error codes. More...

Public Member Functions

Constructors & destructor
 Exception (const ExceptionType &type=INTERNAL_ERROR, const std::string &description="unknown", const std::string &fileName="unknown", const std::string &functionName="unknown", const u32 &lineNumber=0)
 Default constructor.

Static Public Member Functions

Class methods
static std::string translateType (const Exception::ExceptionType &type)
 Translate type to human readable format.

Protected Attributes

Variables
ExceptionType mType
 Type of the exception.
std::string mDescription
 Textual description of the exception.
std::string mFileName
 Name of the file where the exception was thrown.
std::string mFunctionName
 Name of the function where the exception was thrown.
u32 mLineNumber
 Number of the line where the exception was thrown.

Static Protected Attributes

Class variables
static ExceptionmLastException = 0
 Pointer to the last raised exception.

Member Enumeration Documentation

Definitions of error codes.

Enumerator:
INTERNAL_ERROR  Unknown internal error (mostly occured by another library).
NULL_POINTER_ERROR  Nullpointer error.
INVALID_NAME_ERROR  Invalid name error.
INVALID_ENUM_ERROR  Invalid enumerated value error.
INVALID_VALUE_ERROR  Invalid value error.
INVALID_OBJECT_ERROR  Invalid object error.
INVALID_CLASS_ERROR  Invalid class error (not proper derived class).
INVALID_OPERATION_ERROR  Invalid operation error.
OPERATION_NOT_SUPPORTED_ERROR  Operation is not supported on this platform.
OUT_OF_MEMORY_ERROR  Out of memory error.
FILE_IO_ERROR  File I/O error.
FILE_FORMAT_ERROR  Invalid file format error.
USER_BREAK_ERROR  The user stopped the application.
SCRIPT_ERROR  Error in a script file.
XLIB_ERROR  Xlib error.

Definition at line 78 of file PCMException.h.


Constructor & Destructor Documentation

ParCompMark::Exception::Exception ( const ExceptionType type = INTERNAL_ERROR,
const std::string &  description = "unknown",
const std::string &  fileName = "unknown",
const std::string &  functionName = "unknown",
const u32 lineNumber = 0 
) [inline]

Default constructor.

Parameters:
[in] type Type of exception.
[in] description Textual description of the exception.
[in] fileName Name of the file where the exception was thrown.
[in] functionName Name of the function where the exception was thrown.
[in] lineNumber Number of the line where the exception was thrown.

Definition at line 322 of file PCMException.h.


Member Function Documentation

const std::string & ParCompMark::Exception::getDescription (  )  const [inline]

Getter of mDescription.

Returns value of mDescription.

Returns:
The value of mDescription

Definition at line 354 of file PCMException.h.

Referenced by ParCompMarkTest::TestException::test_constructor_cExceptionType_cstd__string_cstd__string_cstd__string_cu32().

const std::string & ParCompMark::Exception::getFileName (  )  const [inline]

Getter of mFileName.

Returns value of mFileName.

Returns:
The value of mFileName

Definition at line 361 of file PCMException.h.

Referenced by ParCompMarkTest::TestException::test_constructor_cExceptionType_cstd__string_cstd__string_cstd__string_cu32(), and ParCompMark::Logger::translateException().

const std::string & ParCompMark::Exception::getFunctionName (  )  const [inline]

Getter of mFunctionName.

Returns value of mFunctionName.

Returns:
The value of mFunctionName

Definition at line 368 of file PCMException.h.

Referenced by ParCompMarkTest::TestException::test_constructor_cExceptionType_cstd__string_cstd__string_cstd__string_cu32().

Exception * ParCompMark::Exception::getLastException (  )  [inline, static]

Getter of mLastException.

Returns value of mLastException.

Returns:
The value of mLastException

Definition at line 382 of file PCMException.h.

Referenced by ParCompMark::Application::terminateHandler().

const u32 & ParCompMark::Exception::getLineNumber (  )  const [inline]

Getter of mLineNumber.

Returns value of mLineNumber.

Returns:
The value of mLineNumber

Definition at line 375 of file PCMException.h.

Referenced by ParCompMarkTest::TestException::test_constructor_cExceptionType_cstd__string_cstd__string_cstd__string_cu32().

std::string ParCompMark::Exception::translateType ( const Exception::ExceptionType type  )  [static]


Member Data Documentation

std::string ParCompMark::Exception::mDescription [protected]

Textual description of the exception.

Remarks:
This is own attribute of this class.

Definition at line 166 of file PCMException.h.

std::string ParCompMark::Exception::mFileName [protected]

Name of the file where the exception was thrown.

Remarks:
This is own attribute of this class.

Definition at line 173 of file PCMException.h.

std::string ParCompMark::Exception::mFunctionName [protected]

Name of the function where the exception was thrown.

Remarks:
This is own attribute of this class.

Definition at line 180 of file PCMException.h.

Pointer to the last raised exception.

Remarks:
This attribute references an attribute.

Definition at line 141 of file PCMException.h.

Number of the line where the exception was thrown.

Remarks:
This is own attribute of this class.

Definition at line 187 of file PCMException.h.

Type of the exception.

Remarks:
This is own attribute of this class.

Definition at line 159 of file PCMException.h.


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