Exception: Ant::Exceptions::AntFail
- Inherits:
-
AntBaseException
- Object
- StandardError
- AntBaseException
- Ant::Exceptions::AntFail
- Defined in:
- lib/ant/exceptions.rb
Overview
Is used to express a problem with the client’s request.
Direct Known Subclasses
Server::Nanoservice::Datasource::Exceptions::ObjectAlreadyExists, Server::Nanoservice::Datasource::Exceptions::ObjectNotFound, Server::Nanoservice::Datasource::Exceptions::ValidationErrors
Instance Attribute Summary
Attributes inherited from AntBaseException
Instance Method Summary collapse
-
#initialize(message, code = nil, data = {}) ⇒ AntFail
constructor
A new instance of AntFail.
Constructor Details
#initialize(message, code = nil, data = {}) ⇒ AntFail
Returns a new instance of AntFail.
36 37 38 39 40 |
# File 'lib/ant/exceptions.rb', line 36 def initialize(, code = nil, data = {}) code ||= self.class.name.split('::').last code = 'BadRequest' if code == 'AntFail' super(, code, data) end |