OpenMPCD
Classes | Macros
Exceptions.hpp File Reference
#include <cstdio>
#include <string>
Include dependency graph for Exceptions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OpenMPCD::Exception
 The base exception class for OpenMPCD. More...
 
class  OpenMPCD::AssertionException
 Represents an exception that is due to an assertion violation. More...
 
class  OpenMPCD::InvalidConfigurationException
 Represents an invalid configuration. More...
 
class  OpenMPCD::NULLPointerException
 NULL-pointer exception. More...
 
class  OpenMPCD::OutOfBoundsException
 Exception for out-of-bounds access. More...
 
class  OpenMPCD::InvalidArgumentException
 Invalid argument exception. More...
 
class  OpenMPCD::InvalidCallException
 Exception for a forbidden function call. More...
 
class  OpenMPCD::IOException
 Error on IO. More...
 
class  OpenMPCD::DivisionByZeroException
 Division by zero. More...
 
class  OpenMPCD::UnimplementedException
 Exception for unimplemented functionality. More...
 
class  OpenMPCD::MemoryManagementException
 Exception for errors in memory management. More...
 
class  OpenMPCD::MalformedFileException
 Represents an exception that signals a malformed file. More...
 

Macros

#define OPENMPCD_THROW(ExceptionType, message)
 Throws the given ExceptionType, passing the given message along with file and line number information to the exception's argument as an instance of std::string. More...
 

Detailed Description

Defines exception classes.

Definition in file Exceptions.hpp.

Macro Definition Documentation

◆ OPENMPCD_THROW

#define OPENMPCD_THROW (   ExceptionType,
  message 
)
Value:
do{const char* const _file=__FILE__; const int _line=__LINE__; \
char _lineString[10]; \
sprintf(_lineString, "%d", _line); \
std::string t(message); \
t+="\r\n\r\nFile: "; \
t+=_file; t+="\r\nLine: "; \
t+=_lineString; \
throw(ExceptionType(t)); \
} while(0)

Throws the given ExceptionType, passing the given message along with file and line number information to the exception's argument as an instance of std::string.

Parameters
[in]ExceptionTypeThe type to throw.
[in]messageThe message to append to file and line number information.

Definition at line 22 of file Exceptions.hpp.