44#ifndef COMMONCPP_EXCEPTION_H_
45#define COMMONCPP_EXCEPTION_H_
47#ifndef COMMONCPP_CONFIG_H_
48#include <commoncpp/config.h>
51#ifndef COMMONCPP_STRING_H_
58#if defined(CCXX_EXCEPTIONS)
59#define COMMONCPP_EXCEPTIONS
74class __EXPORT Exception :
public std::exception
80 Exception(
const String& what_arg)
throw();
81 virtual ~Exception() throw();
82 virtual const
char *getString() const;
83 virtual const
char *what() const throw();
92class __EXPORT IOException : public Exception
96 mutable char* _systemErrorString;
99 IOException(
const String &what_arg,
long systemError = 0) throw();
100 virtual ~IOException() throw();
102 virtual
long getSystemError() const throw();
103 virtual const
char* getSystemErrorString() const throw();
112class __EXPORT ThrException : public Exception
115 inline ThrException(
const String &what_arg) : Exception(what_arg) {}
124class __EXPORT SyncException :
public ThrException
127 inline SyncException(
const String &what_arg) : ThrException(what_arg) {}
130class __EXPORT InterruptException :
public ThrException
133 inline InterruptException() : ThrException(
"interrupted") {}
Common C++ generic string class.