userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
exceptions.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/storages/sqlite/exceptions.hpp
4
5
#
include
<
stdexcept
>
6
#
include
<
string
>
7
8
USERVER_NAMESPACE_BEGIN
9
10
namespace
storages::sqlite {
11
12
/// @brief Base class for all uSQLite driver exceptions
13
class
SQLiteException
:
public
std::runtime_error {
14
public
:
15
SQLiteException(
const
char
* error_message,
int
error_code,
int
extended_error_code);
16
17
SQLiteException(
const
std::string& error_message,
int
error_code,
int
extended_error_code);
18
19
SQLiteException(
const
char
* error_message,
int
error_code);
20
21
SQLiteException(
const
std::string& error_message,
int
error_code);
22
23
explicit
SQLiteException(
const
char
* error_message);
24
25
explicit
SQLiteException(
const
std::string& error_message);
26
27
~SQLiteException() override;
28
29
/// Return the result code (if any, otherwise -1).
30
int
getErrorCode
()
const
noexcept
;
31
32
/// Return the extended numeric result code (if any, otherwise -1).
33
int
getExtendedErrorCode
()
const
noexcept
;
34
35
/// Return a string, solely based on the error code
36
const
char
*
getErrorStr
()
const
noexcept
;
37
38
private
:
39
int
error_code_;
// Error code value
40
int
extended_error_code_;
// Detailed error code if any
41
};
42
43
}
// namespace storages::sqlite
44
45
USERVER_NAMESPACE_END
userver
storages
sqlite
exceptions.hpp
Generated on
for userver by
Doxygen
1.17.0