mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-05 15:21:43 +00:00
27 lines
1.0 KiB
C++
27 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <DB/Common/Exception.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
class NetException : public DB::Exception
|
|
{
|
|
public:
|
|
explicit NetException(int code = 0) : DB::Exception(code) {}
|
|
NetException(const std::string & msg, int code = 0) : DB::Exception(msg, code) {}
|
|
NetException(const std::string & msg, const std::string & arg, int code = 0) : DB::Exception(msg, arg, code) {}
|
|
NetException(const std::string & msg, const DB::Exception & exc, int code = 0) : DB::Exception(msg, exc, code) {}
|
|
|
|
explicit NetException(const DB::Exception & exc) : DB::Exception(exc) {}
|
|
explicit NetException(const Poco::Exception & exc) : DB::Exception(exc.displayText()) {}
|
|
NetException(const DB::NetException & exc) = default;
|
|
|
|
~NetException() throw() override {}
|
|
|
|
const char * name() const throw() override { return "DB::NetException"; }
|
|
const char * className() const throw() override { return "DB::NetException"; }
|
|
DB::NetException * clone() const override { return new DB::NetException(*this); }
|
|
void rethrow() const override { throw *this; }
|
|
};
|
|
} |