Skip to content

Add support for custom error messages#10

Merged
AkihiroSuda merged 1 commit intocontainerd:mainfrom
dmcgowan:custom-error-messages
Jul 3, 2024
Merged

Add support for custom error messages#10
AkihiroSuda merged 1 commit intocontainerd:mainfrom
dmcgowan:custom-error-messages

Conversation

@dmcgowan
Copy link
Member

Add a function to each defined error to set a custom message. This can be helpful when either recreating a error that has been wrapped or wrapped another error. There are also cases where users just don't want to use the default error message.

Due to the Is and As interfaces used by stdlib errors, the new error type is mostly invisible and does not need to be "unwrapped".

Add a function to each defined error to set a custom message.

Signed-off-by: Derek McGowan <[email protected]>
@dmcgowan dmcgowan force-pushed the custom-error-messages branch from c49707a to dc9b20e Compare July 2, 2024 23:52
@dmcgowan
Copy link
Member Author

dmcgowan commented Jul 2, 2024

Updated

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.

3 participants