@@ -39,41 +39,40 @@ namespace influxdb
39
39
class INFLUXDB_EXPORT InfluxDBException : public std::runtime_error
40
40
{
41
41
public:
42
- InfluxDBException (const std::string& source, const std::string& message)
42
+ // / \deprecated Use InfluxDBException(const std::string&) instead - will be removed in v0.8.0
43
+ [[deprecated(" Use InfluxDBException(const std::string&) instead - will be removed in v0.8.0" )]] InfluxDBException(const std::string& source, const std::string& message)
43
44
: std::runtime_error::runtime_error(
44
45
" influx-cxx [" + source + " ]: " + message)
45
46
{
46
47
}
47
- };
48
48
49
- class NonExistentDatabase : public InfluxDBException
50
- {
51
- public:
52
- NonExistentDatabase (const std::string& source, const std::string& message)
53
- : InfluxDBException(source, message)
49
+ explicit InfluxDBException (const std::string& message)
50
+ : std::runtime_error::runtime_error(message)
54
51
{
55
52
}
56
53
};
57
54
58
- class BadRequest : public InfluxDBException
59
- {
60
- public:
61
- BadRequest (const std::string& source, const std::string& message)
62
- : InfluxDBException(source, message)
63
- {
64
- }
55
+
56
+ // / \deprecated Use InfluxDBException instead - will be removed in v0.8.0
57
+ class [[deprecated(" Use InfluxDBException instead - will be removed in v0.8.0" )]] NonExistentDatabase : public InfluxDBException{
58
+ public :
59
+ NonExistentDatabase (const std::string& source, const std::string& message) : InfluxDBException (source, message){}
65
60
};
66
61
67
- class ServerError : public InfluxDBException
68
- {
69
- public:
70
- ServerError (const std::string& source, const std::string& message)
71
- : InfluxDBException(source, message)
72
- {
73
- }
62
+ // / \deprecated Use InfluxDBException instead - will be removed in v0.8.0
63
+ class [[deprecated(" Use InfluxDBException instead - will be removed in v0.8.0" )]] BadRequest : public InfluxDBException{
64
+ public :
65
+ BadRequest (const std::string& source, const std::string& message) : InfluxDBException (source, message){}
66
+ };
67
+
68
+ // / \deprecated Use InfluxDBException instead - will be removed in v0.8.0
69
+ class [[deprecated(" Use InfluxDBException instead - will be removed in v0.8.0" )]] ServerError : public InfluxDBException{
70
+ public :
71
+ ServerError (const std::string& source, const std::string& message) : InfluxDBException (source, message){}
74
72
};
75
73
76
- class ConnectionError : public InfluxDBException
74
+ // / \deprecated Use InfluxDBException instead - will be removed in v0.8.0
75
+ class [[deprecated(" Use InfluxDBException instead - will be removed in v0.8.0" )]] ConnectionError : public InfluxDBException
77
76
{
78
77
public:
79
78
ConnectionError (const std::string& source, const std::string& message)
0 commit comments