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

@@ -31,7 +31,6 @@
#include "fs/Path.hxx"
#include "fs/io/BufferedOutputStream.hxx"
#include "fs/io/StdioOutputStream.hxx"
#include "util/Error.hxx"
#include "thread/Cond.hxx"
#include "Log.hxx"
@@ -63,7 +62,6 @@ try {
config_global_init();
Error error;
ReadConfigFile(config_path);
const ScopeIOThread io_thread;
@@ -82,15 +80,7 @@ try {
if (playlist == NULL) {
/* open the stream and wait until it becomes ready */
is = InputStream::OpenReady(uri, mutex, cond, error);
if (!is) {
if (error.IsDefined())
LogError(error);
else
fprintf(stderr,
"InputStream::Open() failed\n");
return 2;
}
is = InputStream::OpenReady(uri, mutex, cond);
/* open the playlist */