test/*: catch and print all exceptions

This commit is contained in:
Max Kellermann
2018-07-17 21:56:43 +02:00
parent edb44a536a
commit d6529d8c60
24 changed files with 116 additions and 122 deletions

View File

@@ -23,7 +23,7 @@
#include "input/InputStream.hxx"
#include "input/TextInputStream.hxx"
#include "config/Global.hxx"
#include "Log.hxx"
#include "util/PrintException.hxx"
#ifdef ENABLE_ARCHIVE
#include "archive/ArchiveList.hxx"
@@ -96,7 +96,7 @@ try {
auto is = InputStream::OpenReady(argv[1], mutex);
return dump_input_stream(std::move(is));
} catch (const std::exception &e) {
LogError(e);
} catch (...) {
PrintException(std::current_exception());
return EXIT_FAILURE;
}