error-stack: thiserror #[derive(Context)]
#746
-
It seems I'll have to do a lot of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
We thought about this as well but decided that currently, it's not helpful to copy Unless you want to implement Do you have a concrete suggestion on implementing I can think of a macro that is able to attach objects similar to Marking this as the answer for now. If someone has suggestions for concrete macro implementation please open a new discussion. |
Beta Was this translation helpful? Give feedback.
We thought about this as well but decided that currently, it's not helpful to copy
thiserror
.Unless you want to implement
Context::provide()
, or you are inno-std
there is no reason to not usethiserror
s macro. For the former case, we couldn't come up with a good solution to implementprovide()
, for the latter case I expect this to be solved in the near future whenError
is moved tocore
.Do you have a concrete suggestion on implementing
Context
withprovide()
?I can think of a macro that is able to attach objects similar to
tracing::instrument
, but we didn't decide on a syntax, yet, as attachments have no key/value pair likeinstrument
. Suggestions are very welcome! 🙂Marking this as t…