Merge pull request #554 from matthiasbeyer/libimagerror/custom-data-setter
Add setter for custom data for error types
This commit is contained in:
commit
48950b6175
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,11 @@ macro_rules! generate_custom_error_types {
|
|||
self.err_type
|
||||
}
|
||||
|
||||
pub fn with_custom_data(mut self, custom: $customMemberTypeName) -> $name {
|
||||
self.custom_data = Some(custom);
|
||||
self
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Into<$name> for $kindname {
|
||||
|
|
Loading…
Reference in a new issue