Skip to content

Releases: Southclaws/fault

v0.4.1

20 Nov 22:45
Compare
Choose a tag to compare

Add newf for formatting fundamental/root errors.

Rename subpackages

31 Oct 07:53
Compare
Choose a tag to compare

See #5 for rationale

  • renamed errctx to fctx
  • renamed kind to ftag
  • renamed issue to fmsg and removed fault.Msg built-in functionality, users can just use fmsg now as it does the same thing

So now if you want to use all the included utilities, it's a little less noisy:

    return fault.Wrap(err,
        fctx.With(ctx),
        ftag.With(ftag.NotFound),
        fmsg.With("failed to do something"),
    )

and since everything starts with f and gopls can filter suggestions based on what you've already typed and the expected type (which is func(error) error`) then you can very easily find and use the built-ins.

Error utilities

31 Aug 11:21
Compare
Choose a tag to compare

Split the functionality into simpler sub packages. No more stack traces, no more messages. pkg/errors already does this.

  • Added errctx for bridging the gap between context and errors.
  • Added errmeta which includes the core functionality of the original fault code
  • Added errtag which allows tagging errors with well defined types