Idiomatic way to generate custom errors #931
-
Hi, I'm curious what the idiomatic way of converting My crates are organized such that I have Here is what I'm doing right now.
What I already tried:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
I'd like to be able to use the |
Beta Was this translation helpful? Give feedback.
-
@tomtau, sorry for the direct ping, but any suggestions here? |
Beta Was this translation helpful? Give feedback.
Oh, I missed it was
MyError
, notWrapperError
... maybe you can have a helper (private) functiongenerate_ast_helper
that returnsWrapperError
as the error type that's called bygenerate_ast
... in that way, you can use?
in both?