Merge pull request #2091 from nspcc-dev/tune-error-messages

*: simplify some error messages
This commit is contained in:
Roman Khimov 2021-07-23 10:40:26 +03:00 committed by GitHub
commit ad35db66b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -120,7 +120,7 @@ func callExFromNative(ic *interop.Context, caller util.Uint160, cs *state.Contra
}
// ErrNativeCall is returned for failed calls from native.
var ErrNativeCall = errors.New("error during call from native")
var ErrNativeCall = errors.New("failed native call")
// CallFromNative performs synchronous call from native contract.
func CallFromNative(ic *interop.Context, caller util.Uint160, cs *state.Contract, method string, args []stackitem.Item, hasReturn bool) error {

View file

@ -405,7 +405,7 @@ func (c *httpClient) Do(req *http.Request) (*http.Response, error) {
Body: newResponseBody(resp.body),
}, nil
}
return nil, errors.New("error during request")
return nil, errors.New("request failed")
}
func newDefaultHTTPClient() oracle.HTTPClient {

View file

@ -33,7 +33,7 @@ type errorAtInstruct struct {
}
func (e *errorAtInstruct) Error() string {
return fmt.Sprintf("error encountered at instruction %d (%s): %s", e.ip, e.op, e.err)
return fmt.Sprintf("at instruction %d (%s): %s", e.ip, e.op, e.err)
}
func newError(ip int, op opcode.Opcode, err interface{}) *errorAtInstruct {