Main, ...: catch any exception, not just std::runtime_error
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user