Main, ...: catch any exception, not just std::runtime_error

This commit is contained in:
Max Kellermann
2017-12-19 10:56:23 +01:00
parent a539094c06
commit 914df18bf9
79 changed files with 236 additions and 244 deletions

View File

@@ -26,7 +26,7 @@
#include "util/Domain.hxx"
#include "Log.hxx"
#include <stdexcept>
#include <exception>
#include <sndfile.h>
@@ -93,8 +93,8 @@ sndfile_vio_seek(sf_count_t _offset, int whence, void *user_data)
try {
is.LockSeek(offset);
return is.GetOffset();
} catch (const std::runtime_error &e) {
LogError(e, "Seek failed");
} catch (...) {
LogError(std::current_exception(), "Seek failed");
return -1;
}
}