Skip to content

Commit

Permalink
Merge pull request #551 from WebFreak001/improve-package-errors
Browse files Browse the repository at this point in the history
add error logging on DB errors
  • Loading branch information
s-ludwig authored Oct 5, 2023
2 parents 2d1575a + ac61ae0 commit ac5eaef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/dubregistry/registry.d
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ class DubRegistry {
{
DbPackage pack;
try pack = m_db.getPackage(packname);
catch(Exception) return PackageInfo.init;
catch (RecordNotFound) return PackageInfo.init;
catch (Exception e) {
logError("Unexpected Exception when calling db.getPackage: %s", (() @trusted => e.toString())());
return PackageInfo.init;
}

return getPackageInfo(pack, flags);
}
Expand Down

0 comments on commit ac5eaef

Please sign in to comment.