1#pragma once
2
3#include <Common/Exception.h>
4
5
6namespace DB
7{
8
9class NetException : public Exception
10{
11public:
12 NetException(const std::string & msg, int code) : Exception(msg, code) {}
13
14 NetException * clone() const override { return new NetException(*this); }
15 void rethrow() const override { throw *this; }
16
17private:
18 const char * name() const throw() override { return "DB::NetException"; }
19 const char * className() const throw() override { return "DB::NetException"; }
20};
21
22}
23