lo icon indicating copy to clipboard operation
lo copied to clipboard

Custom error type.

Open RelicOfTesla opened this issue 1 year ago • 4 comments

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

RelicOfTesla avatar Jan 11 '24 14:01 RelicOfTesla

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

heww avatar Jan 29 '24 03:01 heww

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

Can you give me a example code ?

RelicOfTesla avatar Jan 29 '24 06:01 RelicOfTesla

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.

heww avatar Jan 29 '24 09:01 heww

Haha, this is right. I misunderstood your meaning.

RelicOfTesla avatar Jan 29 '24 15:01 RelicOfTesla