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

@@ -30,7 +30,7 @@
#include <audiofile.h>
#include <af_vfs.h>
#include <stdexcept>
#include <exception>
#include <assert.h>
#include <stdio.h>
@@ -120,8 +120,8 @@ audiofile_file_seek(AFvirtualfile *vfile, AFfileoffset _offset,
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;
}
}