gofr icon indicating copy to clipboard operation
gofr copied to clipboard

Create an Error package and have some pre-defined errors

Open vikash opened this issue 1 year ago • 6 comments

For example: GofrError, DBError, PubSubError etc.

pkg/errors package has Wrap and WithStack which can be used to provide more contexts.

vikash avatar Apr 29 '24 15:04 vikash

Can you assign this issue to me? @vikash

MadhushaPrasad avatar May 06 '24 01:05 MadhushaPrasad

Sure @MadhushaPrasad assigning the issue to you. Please discuss how the user's will be using these errors (just the raw approach ) before submitting the PR.

Umang01-hash avatar May 06 '24 05:05 Umang01-hash

Wrap and WithStack

can you give me some more details about this Wrap and WithStack? @vikash

MadhushaPrasad avatar May 07 '24 11:05 MadhushaPrasad

Wrap and WithStack

can you give me some more details about this Wrap and WithStack? @vikash

@MadhushaPrasad you can refer here : https://github.com/pkg/errors?tab=readme-ov-file#adding-context-to-an-error To see what is errors.Wrap.

I also found this repository for go-errors: https://github.com/go-errors/errors

Umang01-hash avatar May 09 '24 04:05 Umang01-hash

Wrap and WithStack

can you give me some more details about this Wrap and WithStack? @vikash

@MadhushaPrasad you can refer here : https://github.com/pkg/errors?tab=readme-ov-file#adding-context-to-an-error To see what is errors.Wrap.

I also found this repository for go-errors: https://github.com/go-errors/errors

ok thank you

MadhushaPrasad avatar May 09 '24 04:05 MadhushaPrasad

@MadhushaPrasad Hey! Did we came to any raw implementation on how the users will be using our errors package?

Umang01-hash avatar May 13 '24 04:05 Umang01-hash