mirror of
https://github.com/ksherlock/profuse.git
synced 2025-01-05 05:29:37 +00:00
25ad5cf7f5
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@403 aa027e90-d47c-11dd-86d7-074df07e0730
36 lines
574 B
C++
36 lines
574 B
C++
#ifndef __COMMON_EXCEPTION_H__
|
|
#define __COMMON_EXCEPTION_H__
|
|
|
|
#include <string>
|
|
#include <exception>
|
|
|
|
|
|
class Exception : public std::exception
|
|
{
|
|
public:
|
|
Exception(const char *cp);
|
|
Exception(const std::string &str);
|
|
|
|
|
|
virtual ~Exception() throw ();
|
|
|
|
virtual const char *what() const throw();
|
|
virtual const char *errorString();
|
|
|
|
int error() const { return _error; }
|
|
|
|
protected:
|
|
Exception(const char *cp, int error);
|
|
Exception(const std::string& string, int error);
|
|
|
|
private:
|
|
int _error;
|
|
std::string _string;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif |