mirror of
https://github.com/docker/docs.git
synced 2026-04-05 18:58:55 +07:00
Show exact file being parsed on error.
When there's more than on json file in there we don't tell the user which one was an issue. Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package trust
|
||||
import (
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -81,12 +82,12 @@ func (t *TrustStore) reload() error {
|
||||
for i, match := range matches {
|
||||
f, err := os.Open(match)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("Error opening %q: %s", match, err)
|
||||
}
|
||||
statements[i], err = trustgraph.LoadStatement(f, nil)
|
||||
if err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
return fmt.Errorf("Error loading %q: %s", match, err)
|
||||
}
|
||||
f.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user