I\'m defining a custom Exception on a model in rails as kind of a wrapper Exception: (begin[code]rescue[raise custom exception]end)
begin[code]rescue[raise custom exception]end
When I raise the Exc
create an instance of your exception with new:
class CustomException < StandardError def initialize(data) @data = data end end # => nil raise CustomException.new(bla: "blupp") # CustomException: CustomException