rcpp_framework/libs/brynet/net/Exception.hpp

37 lines
685 B
C++
Raw Normal View History

2020-11-24 15:41:18 +01:00
#pragma once
#include <stdexcept>
2021-04-30 16:10:14 +02:00
#include <string>
2020-11-24 15:41:18 +01:00
namespace brynet { namespace net {
2021-04-30 16:10:14 +02:00
class ConnectException : public std::runtime_error
{
public:
explicit ConnectException(const std::string& message)
: std::runtime_error(message)
2020-11-24 15:41:18 +01:00
{
2021-04-30 16:10:14 +02:00
}
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
explicit ConnectException(const char* message)
: std::runtime_error(message)
{
}
};
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
class BrynetCommonException : public std::runtime_error
{
public:
explicit BrynetCommonException(const std::string& message)
: std::runtime_error(message)
2020-11-24 15:41:18 +01:00
{
2021-04-30 16:10:14 +02:00
}
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
explicit BrynetCommonException(const char* message)
: std::runtime_error(message)
{
}
};
2020-11-24 15:41:18 +01:00
2021-04-30 16:10:14 +02:00
}}// namespace brynet::net