Exception: Ant::Exceptions::AntFail

Inherits:
AntBaseException show all
Defined in:
lib/ant/exceptions.rb

Overview

Is used to express a problem with the client’s request.

Instance Attribute Summary

Attributes inherited from AntBaseException

#code, #data, #message

Instance Method Summary collapse

Methods inherited from AntBaseException

#to_h, #to_log_format

Constructor Details

#initialize(message, code = nil, data = {}) ⇒ AntFail

Returns a new instance of AntFail.



52
53
54
55
56
# File 'lib/ant/exceptions.rb', line 52

def initialize(message, code = nil, data = {})
  code ||= self.class.name.split('::').last
  code = 'BadRequest' if code == 'AntFail'
  super(message, code, data)
end