forked from pingcap/errcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error code wrapping with some generic reuse
The goal is to wrap an ErrorCode while maintaining its type. This allows for using UserCode as a marke type that a user message will be returned and still allows for wrapping the error with extra information. In-place modification accomplishes this, and will be used if available (via ErrorWrapper) However, requiring this in the ErrorCode interface is too burdensome. Instead fallback to a wrapper type that will be different per-interface. There are different wrapping functions for each interface to maintain the type and not downcast to ErrorCode.
- Loading branch information
Greg Weber
committed
Oct 4, 2024
1 parent
39445d0
commit a65d526
Showing
9 changed files
with
353 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.