Merge pull request #23 from samueldr/fix/json-error-handling

file-cache: use the right exception type for parse error
This commit is contained in:
Graham Christensen 2019-01-30 22:58:33 -05:00 committed by GitHub
commit d7a903d1c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,7 +140,7 @@ public:
throw Error("NAR index for %s has an unsupported version", storePath);
recurse("", ls.at("root"));
} catch (std::invalid_argument & e) {
} catch (json::parse_error & e) {
// FIXME: some filenames have non-UTF8 characters in them,
// which is not supported by nlohmann::json. So we have to
// skip the entire package.