summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-09-02 10:19:10 +0200
committerMax Kellermann <max@musicpd.org>2018-09-02 10:19:10 +0200
commitc59be7ced3d95c7761811c37c0792e46363990a2 (patch)
tree5cd26f7e1e238ae7eb75f99052fdfe365a84c603 /src/db
parentc5c4d4a57e02103b752e6b53330a28c298556f34 (diff)
db/Interface: add more documentation about exceptions
Diffstat (limited to 'src/db')
-rw-r--r--src/db/Interface.hxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/db/Interface.hxx b/src/db/Interface.hxx
index a8db2b12a..67f67aa28 100644
--- a/src/db/Interface.hxx
+++ b/src/db/Interface.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2017 The Music Player Daemon Project
+ * Copyright 2003-2018 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -55,7 +55,7 @@ public:
/**
* 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() {
}
@@ -69,9 +69,8 @@ public:
* Look up a song (including tag data) in the database. When
* you don't need this anymore, call ReturnSong().
*
- * Throws std::runtime_error (or its derivative
- * #DatabaseError) on error. "Not found" is an error that
- * throws DatabaseErrorCode::NOT_FOUND.
+ * Throws on error. "Not found" is an error that throws
+ * DatabaseErrorCode::NOT_FOUND.
*
* @param uri_utf8 the URI of the song within the music
* directory (UTF-8)
@@ -87,6 +86,8 @@ public:
/**
* Visit the selected entities.
+ *
+ * Throws on error.
*/
virtual void Visit(const DatabaseSelection &selection,
VisitDirectory visit_directory,
@@ -106,17 +107,22 @@ public:
/**
* Visit all unique tag values.
+ *
+ * Throws on error.
*/
virtual void VisitUniqueTags(const DatabaseSelection &selection,
TagType tag_type, TagMask group_mask,
VisitTag visit_tag) const = 0;
+ /**
+ * Throws on error.
+ */
virtual DatabaseStats GetStats(const DatabaseSelection &selection) const = 0;
/**
* Update the database.
*
- * Throws #std::runtime_error on error.
+ * Throws on error.
*
* @return the job id or 0 if not implemented
*/