ClickHouse/dbms/Common/NetException.h

23 lines
495 B
C++
Raw Normal View History

2015-10-05 01:26:43 +00:00
#pragma once
#include <Common/Exception.h>
2015-10-05 01:26:43 +00:00
namespace DB
{
2018-11-22 18:09:17 +00:00
class NetException : public Exception
2015-10-05 01:26:43 +00:00
{
public:
NetException(const std::string & msg, int code) : Exception(msg, code) {}
2015-10-05 01:26:43 +00:00
2018-11-22 18:09:17 +00:00
NetException * clone() const override { return new NetException(*this); }
void rethrow() const override { throw *this; }
2015-10-05 01:26:43 +00:00
2018-11-22 18:09:17 +00:00
private:
const char * name() const throw() override { return "DB::NetException"; }
const char * className() const throw() override { return "DB::NetException"; }
2015-10-05 01:26:43 +00:00
};
}