Skip to content

Commit

Permalink
db/pgsql/feature: fix SQL error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie committed Jan 3, 2017
1 parent 8d29bf8 commit 627b98e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/pgsql/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func linkFeatureVersionToVulnerabilities(tx *sql.Tx, featureVersion database.Fea
// TODO(Quentin-M): LIMIT
rows, err := tx.Query(searchVulnerabilityFixedInFeature, featureVersion.Feature.ID)
if err != nil {
return err
return handleError("searchVulnerabilityFixedInFeature", err)
}
defer rows.Close()

Expand All @@ -218,7 +218,7 @@ func linkFeatureVersionToVulnerabilities(tx *sql.Tx, featureVersion database.Fea

cmp, err := versionfmt.Compare(featureVersion.Feature.Namespace.VersionFormat, featureVersion.Version, affect.fixedInVersion)
if err != nil {
return handleError("searchVulnerabilityVersionComparison", err)
return err
}
if cmp < 0 {
// The version of the FeatureVersion we are inserting is lower than the fixed version on this
Expand Down

0 comments on commit 627b98e

Please sign in to comment.