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

@@ -118,16 +118,8 @@ try {
{
Mutex mutex;
Cond cond;
auto is = InputStream::OpenReady(argv[1], mutex, cond, error);
if (is) {
ret = dump_input_stream(is.get());
} else {
if (error.IsDefined())
LogError(error);
else
fprintf(stderr, "input_stream::Open() failed\n");
ret = EXIT_FAILURE;
}
auto is = InputStream::OpenReady(argv[1], mutex, cond);
ret = dump_input_stream(is.get());
}
/* deinitialize everything */