input/Plugin: migrate open() from class Error to C++ exceptions

This commit is contained in:
Max Kellermann
2016-09-09 15:37:06 +02:00
parent 63ab7767a3
commit fc7d3f64c0
44 changed files with 359 additions and 461 deletions

View File

@@ -115,16 +115,17 @@ public:
* Opens a new input stream. You may not access it until the "ready"
* flag is set.
*
* Throws std::runtime_error on error.
*
* @param mutex a mutex that is used to protect this object; must be
* locked before calling any of the public methods
* @param cond a cond that gets signalled when the state of
* this object changes; may be nullptr if the caller doesn't want to get
* notifications
* @return an #InputStream object on success, nullptr on error
* @return an #InputStream object on success
*/
gcc_nonnull_all
static InputStreamPtr Open(const char *uri, Mutex &mutex, Cond &cond,
Error &error);
static InputStreamPtr Open(const char *uri, Mutex &mutex, Cond &cond);
/**
* Just like Open(), but waits for the stream to become ready.
@@ -132,8 +133,7 @@ public:
*/
gcc_nonnull_all
static InputStreamPtr OpenReady(const char *uri,
Mutex &mutex, Cond &cond,
Error &error);
Mutex &mutex, Cond &cond);
/**
* The absolute URI which was used to open this stream.