Go to the documentation of this file.
5 #ifndef BALL_COMMON_EXCEPTION_H
6 #define BALL_COMMON_EXCEPTION_H
8 #ifndef BALL_CONFIG_CONFIG_H
9 # include <BALL/CONFIG/config.h>
12 #ifndef BALL_COMMON_GLOBAL_H
16 #ifdef BALL_COMPILER_MSVC
18 #pragma warning( disable : 4251 ) //disable needs to have dll-interface to be used by clients of class 'std::string'
60 :
public std::exception
76 (
const char* file,
int line,
94 const
char* getMessage() const;
97 void setMessage(const std::
string& message);
103 const
char* getFile() const;
111 std::
string message_;
370 std::
string filename_;
537 (
const String& file,
int line,
585 #ifdef BALL_COMPILER_MSVC
589 #endif // BALL_COMMON_EXCEPTION_H
CUDAError(const char *file, int line, const String &error)
SizeUnderflow(const char *file, int line, Size size=0)
NoBufferAvailable(const char *file, int line, const String &reason)
virtual ~GeneralException()
Destructor.
DivisionByZero(const char *file, int line)
InvalidFormat(const char *file, int line, const String &s)
FileNotFound(const char *file, int line, const String &filename)
OutOfMemory(const char *file, int line, Size size=0)
GeneralException(const char *file, int line)
Constructor.
Precondition(const char *file, int line, const char *condition)
Postcondition(const char *file, int line, const char *condition)
static void terminate()
The BALL replacement for terminate.
TooManyErrors(const char *file, int line)
Exception to be thrown if too many bonds for one atom.
NullPointer(const char *file, int line)
ParseError(const char *file, int line, const String &expression, const String &message)
static std::string message_
static void set(const String &file, int line, const String &name, const String &message)
Set all exception attributes.
IllegalSelfOperation(const char *file, int line)
GeneralException(const GeneralException &exception)
Copy constructor.
static void setFile(const String &file)
The source file name where the exception was thrown.
IncompatibleIterators(const char *file, int line)
Exception to be thrown if an invalid option is given.
InvalidSize(const char *file, int line, Size size=0)
BufferOverflow(const char *file, int line)
static void setName(const String &name)
Assign the name of the exception. This should agree with the class name.
FormatUnsupported(const char *file, int line)
InvalidIterator(const char *file, int line)
IllegalPosition(const char *file, int line, float x, float y, float z)
NotInitialized(const char *file, int line, const String &reason)
GeneralException()
Default constructor.
IndexUnderflow(const char *file, int line, Index index=0, Size size=0)
BALL_EXPORT GlobalExceptionHandler globalHandler
static void setMessage(const String &message)
Set the error message.
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
InvalidArgument(const char *file, int line, const String &arg)
GeneralException(const char *file, int line, const String &name, const String &message)
Constructor.
Exception to be thrown if too many errors occur, e.g. in ForceField.
NotImplemented(const char *file, int line)
IndexOverflow(const char *file, int line, Index index=0, Size size=0)
InvalidRange(const char *file, int line, float value)
IllegalTreeOperation(const char *file, int line)
OutOfRange(const char *file, int line)
OutOfGrid(const char *file, int line)
TooManyBonds(const char *file, int line, const String &error)
InvalidOption(const char *file, int line, String option)
static void setLine(int line)
Set the line number the exception was thrown. Should be set to LINE in most cases.