Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fb01e41e
Commit
fb01e41e
authored
Nov 12, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/sqlite: add "noexcept"
parent
ff9759c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
Error.cxx
src/lib/sqlite/Error.cxx
+4
-3
Error.hxx
src/lib/sqlite/Error.hxx
+2
-2
No files found.
src/lib/sqlite/Error.cxx
View file @
fb01e41e
...
...
@@ -24,13 +24,14 @@
#include <string>
static
std
::
string
MakeSqliteErrorMessage
(
sqlite3
*
db
,
const
char
*
msg
)
MakeSqliteErrorMessage
(
sqlite3
*
db
,
const
char
*
msg
)
noexcept
{
return
std
::
string
(
msg
)
+
": "
+
sqlite3_errmsg
(
db
);
}
SqliteError
::
SqliteError
(
sqlite3
*
db
,
int
_code
,
const
char
*
msg
)
SqliteError
::
SqliteError
(
sqlite3
*
db
,
int
_code
,
const
char
*
msg
)
noexcept
:
std
::
runtime_error
(
MakeSqliteErrorMessage
(
db
,
msg
)),
code
(
_code
)
{}
SqliteError
::
SqliteError
(
sqlite3_stmt
*
stmt
,
int
_code
,
const
char
*
msg
)
SqliteError
::
SqliteError
(
sqlite3_stmt
*
stmt
,
int
_code
,
const
char
*
msg
)
noexcept
:
SqliteError
(
sqlite3_db_handle
(
stmt
),
_code
,
msg
)
{}
src/lib/sqlite/Error.hxx
View file @
fb01e41e
...
...
@@ -29,8 +29,8 @@ class SqliteError final : public std::runtime_error {
int
code
;
public
:
SqliteError
(
sqlite3
*
db
,
int
_code
,
const
char
*
msg
);
SqliteError
(
sqlite3_stmt
*
stmt
,
int
_code
,
const
char
*
msg
);
SqliteError
(
sqlite3
*
db
,
int
_code
,
const
char
*
msg
)
noexcept
;
SqliteError
(
sqlite3_stmt
*
stmt
,
int
_code
,
const
char
*
msg
)
noexcept
;
int
GetCode
()
const
{
return
code
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment