Skip to content

Conversation

@dwb
Copy link

@dwb dwb commented Jul 28, 2022

This allows you to mark terror.Errors as "verbose". The most useful
upshot of this, as mentioned in the godoc, is so that you can get more
information in a failed test if you write

require.NoError(t, terrors.Verbose(err))

This will cause err.Error() on the returned error to return
the VerboseString() rather than the regular short one.

(Also updated testify to the same version as used elsewhere in the org,
so that I can use the require package.)

This allows you to mark terror.Errors as "verbose". The most useful
upshot of this, as mentioned in the godoc, is so that you can get more
information in a failed test if you write

```go
require.NoError(t, terrors.Verbose(err))
```

This will cause `err.Error()` on the returned error to return
the `VerboseString()` rather than the regular short one.
@dwb dwb mentioned this pull request Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants