profuse/Common/Exception.h
ksherlock 25ad5cf7f5 exception::what() const throw()
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@403 aa027e90-d47c-11dd-86d7-074df07e0730
2012-08-31 00:17:35 +00:00

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