Exceptions.h
Go to the documentation of this file.
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$
#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H
#include <stdexcept>
#include <string>
class RcsbException : public std::exception
{
protected:
std::string _message;
public:
RcsbException(const std::string& message = std::string(),
const std::string& location = std::string());
~RcsbException() throw();
void AppendMessage(const std::string& message = std::string(),
const std::string& location = std::string());
const char* what() const throw();
};
class EmptyValueException : public RcsbException
{
public:
EmptyValueException(const std::string& message = std::string(),
const std::string& location = std::string());
~EmptyValueException() throw();
};
class NotFoundException : public RcsbException
{
public:
NotFoundException(const std::string& message = std::string(),
const std::string& location = std::string());
~NotFoundException() throw();
};
class AlreadyExistsException : public RcsbException
{
public:
AlreadyExistsException(const std::string& message = std::string(),
const std::string& location = std::string());
~AlreadyExistsException() throw();
};
class EmptyContainerException : public RcsbException
{
public:
EmptyContainerException(const std::string& message = std::string(),
const std::string& location = std::string());
~EmptyContainerException() throw();
};
class FileModeException : public RcsbException
{
public:
FileModeException(const std::string& message = std::string(),
const std::string& location = std::string());
~FileModeException() throw();
};
class InvalidStateException : public RcsbException
{
public:
InvalidStateException(const std::string& message = std::string(),
const std::string& location = std::string());
~InvalidStateException() throw();
};
class FileException : public RcsbException
{
public:
FileException(const std::string& message = std::string(),
const std::string& location = std::string());
~FileException() throw();
};
class InvalidOptionsException : public RcsbException
{
public:
InvalidOptionsException(const std::string& message = std::string(),
const std::string& location = std::string());
~InvalidOptionsException() throw();
};
class VersionMismatchException : public RcsbException
{
public:
VersionMismatchException(const std::string& message = std::string(),
const std::string& location = std::string());
~VersionMismatchException() throw();
};
#endif
InvalidStateException
Invalid state exception (e.g. getting a row reference in a column-wise table/// )
Definition: Exceptions.h:101
EmptyValueException
Empty value exception (e.g. NULL pointer, empty string)
Definition: Exceptions.h:41
RcsbException::AppendMessage
void AppendMessage(const std::string &message=std::string(), const std::string &location=std::string())
FileException
Generic files related exception (e.g. read error, write errror, etc.)
Definition: Exceptions.h:113
FileModeException
File mode exception (e.g. attempt to write to read-only file, invalid mode.)
Definition: Exceptions.h:89
VersionMismatchException
Versions do not match.
Definition: Exceptions.h:133
RcsbException::_message
std::string _message
Definition: Exceptions.h:26
RcsbException::~RcsbException
~RcsbException()
EmptyContainerException
Empty container.
Definition: Exceptions.h:77
InvalidOptionsException
Invalid command line options.
Definition: Exceptions.h:124
RcsbException::what
const char * what() const
NotFoundException
Object not found (thrown everywhere except from .find() methods)
Definition: Exceptions.h:53
RcsbException::RcsbException
RcsbException(const std::string &message=std::string(), const std::string &location=std::string())
RcsbException
Base class for all RCSB exceptions.
Definition: Exceptions.h:23
AlreadyExistsException
Object already exists.
Definition: Exceptions.h:65