diff --git a/src/libstore/path-references.cc b/src/libstore/path-references.cc index 3d783bbe4be..9571da65cd9 100644 --- a/src/libstore/path-references.cc +++ b/src/libstore/path-references.cc @@ -124,7 +124,7 @@ void scanForReferencesDeep( case SourceAccessor::tFifo: case SourceAccessor::tUnknown: default: - throw Error("file '%s' has an unsupported type", path.abs()); + throw Error("file '%s' has an unsupported type", accessor.showPath(path)); } }; diff --git a/src/libutil/nar-listing.cc b/src/libutil/nar-listing.cc index 1483c7a0c8e..358256bf0c9 100644 --- a/src/libutil/nar-listing.cc +++ b/src/libutil/nar-listing.cc @@ -157,7 +157,8 @@ static ListNarResult listNarImpl(SourceAccessor & accessor, const CanonPat case SourceAccessor::Type::tSocket: case SourceAccessor::Type::tFifo: case SourceAccessor::Type::tUnknown: - assert(false); // cannot happen for NARs + default: + throw Error("file '%s' has an unsupported type", accessor.showPath(path)); } }