mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 14:17:56 +01:00
multi: wrap all errors
This commit is contained in:
committed by
Andras Banki-Horvath
parent
9a28a4c105
commit
648fb22f63
@@ -224,7 +224,7 @@ func loadProfileFile(file string) (*profileFile, error) {
|
||||
|
||||
content, err := ioutil.ReadFile(file)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not load profile file %s: %v",
|
||||
return nil, fmt.Errorf("could not load profile file %s: %w",
|
||||
file, err)
|
||||
}
|
||||
f := &profileFile{}
|
||||
@@ -262,7 +262,7 @@ func (f *profileFile) unmarshalJSON(content []byte) error {
|
||||
func (f *profileFile) marshalJSON() ([]byte, error) {
|
||||
b, err := json.Marshal(f)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error JSON marshalling profile: %v",
|
||||
return nil, fmt.Errorf("error JSON marshalling profile: %w",
|
||||
err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user