Changing error def
This commit is contained in:
parent
caf9644d50
commit
0337ec8cbc
@ -126,7 +126,11 @@ func (gs *goldsmith) referenceFile(path string) {
|
|||||||
|
|
||||||
func (gs *goldsmith) fault(f *file, err error) {
|
func (gs *goldsmith) fault(f *file, err error) {
|
||||||
gs.errorMtx.Lock()
|
gs.errorMtx.Lock()
|
||||||
gs.errors = append(gs.errors, &Error{f, err})
|
ferr := &Error{err: err}
|
||||||
|
if f != nil {
|
||||||
|
ferr.path = f.path
|
||||||
|
}
|
||||||
|
gs.errors = append(gs.errors, ferr)
|
||||||
gs.errorMtx.Unlock()
|
gs.errorMtx.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user