always wrap errors when creating new ones with fmt.Errorf()
It doesn't really change anything in most of the cases, but it's a useful habit anyway. Fix #350.
This commit is contained in:
parent
205f52c563
commit
0e2784cd2c
24 changed files with 105 additions and 84 deletions
|
@ -614,7 +614,7 @@ func (s *Server) getDecimals(contractID int32, cache map[int32]decimals) (decima
|
|||
},
|
||||
})
|
||||
if err != nil {
|
||||
return decimals{}, fmt.Errorf("can't create script: %v", err)
|
||||
return decimals{}, fmt.Errorf("can't create script: %w", err)
|
||||
}
|
||||
res := s.runScriptInVM(script, nil)
|
||||
if res == nil || res.State != "HALT" || len(res.Stack) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue