Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom error type. #419

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Custom error type. #419

wants to merge 2 commits into from

Conversation

RelicOfTesla
Copy link

@RelicOfTesla RelicOfTesla commented Jan 11, 2024

Support user custom error handle in Must() ( like attach the callstack information );
Support MustE("foo", customErr{A: 11, B: 22}) to recover customErr type.

@heww
Copy link

heww commented Jan 29, 2024

Hi, could someone take a look at this MR? The MustX function will lose the original error.

@RelicOfTesla
Copy link
Author

Hi, could someone take a look at this MR? The MustX function will lose the original error.

Can you give me a example code ?

@heww
Copy link

heww commented Jan 29, 2024

Hi, could someone take a look at this MR? The MustX function will lose the original error.

Can you give me a example code ?

The MuxtX means the Must and Must{0->6}, here is an example I can't restore the original error. https://goplay.space/#k1qNcdql4Uz

I like the MustE in this MR.

@RelicOfTesla
Copy link
Author

Haha, this is right. I misunderstood your meaning.

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.

None yet

2 participants