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
c59be7ce
Commit
c59be7ce
authored
Sep 02, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/Interface: add more documentation about exceptions
parent
c5c4d4a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Interface.hxx
src/db/Interface.hxx
+12
-6
No files found.
src/db/Interface.hxx
View file @
c59be7ce
/*
/*
* Copyright 2003-201
7
The Music Player Daemon Project
* Copyright 2003-201
8
The Music Player Daemon Project
* http://www.musicpd.org
* http://www.musicpd.org
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -55,7 +55,7 @@ public:
...
@@ -55,7 +55,7 @@ public:
/**
/**
* Open the database. Read it into memory if applicable.
* Open the database. Read it into memory if applicable.
*
*
* Throws
#DatabaseError or std::runtime_error on error
.
* Throws
on error (e.g. #DatabaseError)
.
*/
*/
virtual
void
Open
()
{
virtual
void
Open
()
{
}
}
...
@@ -69,9 +69,8 @@ public:
...
@@ -69,9 +69,8 @@ public:
* Look up a song (including tag data) in the database. When
* Look up a song (including tag data) in the database. When
* you don't need this anymore, call ReturnSong().
* you don't need this anymore, call ReturnSong().
*
*
* Throws std::runtime_error (or its derivative
* Throws on error. "Not found" is an error that throws
* #DatabaseError) on error. "Not found" is an error that
* DatabaseErrorCode::NOT_FOUND.
* throws DatabaseErrorCode::NOT_FOUND.
*
*
* @param uri_utf8 the URI of the song within the music
* @param uri_utf8 the URI of the song within the music
* directory (UTF-8)
* directory (UTF-8)
...
@@ -87,6 +86,8 @@ public:
...
@@ -87,6 +86,8 @@ public:
/**
/**
* Visit the selected entities.
* Visit the selected entities.
*
* Throws on error.
*/
*/
virtual
void
Visit
(
const
DatabaseSelection
&
selection
,
virtual
void
Visit
(
const
DatabaseSelection
&
selection
,
VisitDirectory
visit_directory
,
VisitDirectory
visit_directory
,
...
@@ -106,17 +107,22 @@ public:
...
@@ -106,17 +107,22 @@ public:
/**
/**
* Visit all unique tag values.
* Visit all unique tag values.
*
* Throws on error.
*/
*/
virtual
void
VisitUniqueTags
(
const
DatabaseSelection
&
selection
,
virtual
void
VisitUniqueTags
(
const
DatabaseSelection
&
selection
,
TagType
tag_type
,
TagMask
group_mask
,
TagType
tag_type
,
TagMask
group_mask
,
VisitTag
visit_tag
)
const
=
0
;
VisitTag
visit_tag
)
const
=
0
;
/**
* Throws on error.
*/
virtual
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
=
0
;
virtual
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
=
0
;
/**
/**
* Update the database.
* Update the database.
*
*
* Throws
#std::runtime_error
on error.
* Throws on error.
*
*
* @return the job id or 0 if not implemented
* @return the job id or 0 if not implemented
*/
*/
...
...
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