ClickHouse/dbms/include/DB/Core/Exception.h

32 lines
701 B
C
Raw Normal View History

2011-12-12 06:15:34 +00:00
#pragma once
2010-03-01 16:59:51 +00:00
#include <Poco/Exception.h>
2011-12-12 06:15:34 +00:00
#include <DB/Core/StackTrace.h>
2010-03-01 16:59:51 +00:00
namespace DB
{
2011-12-12 06:15:34 +00:00
class Exception : public Poco::Exception
{
public:
Exception(int code = 0);
Exception(const std::string & msg, int code = 0);
Exception(const std::string & msg, const std::string & arg, int code = 0);
Exception(const std::string & msg, const Exception & exc, int code = 0);
Exception(const Exception & exc);
~Exception() throw();
Exception & operator = (const Exception & exc);
const char * name() const throw();
const char * className() const throw();
Exception * clone() const;
void rethrow() const;
const StackTrace & getStackTrace() const { return trace; }
2010-03-01 16:59:51 +00:00
2011-12-12 06:15:34 +00:00
private:
StackTrace trace;
};
}