-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It would be cool to have #wrap or #chain method to wrap error instead of passing it to new.
Example
class MyError
include Nesty::NestedError
end
begin
boooom!
rescue NoMethodError => original_error
my_error = MyError.custom_method_to_build_error_message(with, number, of, parameters)
my_error.wrap(original_error) # That's where I would like to use it
raise my_error
endAlso I can pass original_error to MyError.custom_method_to_build_error_message as additional parameter but I would prefer avoid doing this to not overload interface with parameters and to make it more reusable.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels