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

@@ -299,7 +299,7 @@ CompositeStorage::OpenDirectory(const char *uri)
try {
other = f.directory->storage->OpenDirectory(f.uri);
} catch (const std::runtime_error &) {
} catch (...) {
}
return new CompositeDirectoryReader(other, directory->children);

View File

@@ -194,7 +194,7 @@ ParseTimeStamp(const char *s)
try {
// TODO: make this more robust
return ParseTimePoint(s, "%a, %d %b %Y %T %Z");
} catch (const std::runtime_error &) {
} catch (...) {
return std::chrono::system_clock::time_point::min();
}
}

View File

@@ -123,7 +123,7 @@ LocalStorage::MapFS(const char *uri_utf8) const noexcept
{
try {
return MapFSOrThrow(uri_utf8);
} catch (const std::runtime_error &) {
} catch (...) {
return AllocatedPath::Null();
}
}