| 1 | #pragma once |
| 2 | |
| 3 | #include <Common/Exception.h> |
| 4 | |
| 5 | |
| 6 | namespace DB |
| 7 | { |
| 8 | |
| 9 | class NetException : public Exception |
| 10 | { |
| 11 | public: |
| 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 | |
| 17 | private: |
| 18 | const char * name() const throw() override { return "DB::NetException" ; } |
| 19 | const char * className() const throw() override { return "DB::NetException" ; } |
| 20 | }; |
| 21 | |
| 22 | } |
| 23 | |