Exception: Ant::Exceptions::AntError

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

Overview

Is used to express an error that was found during the execution of the program but it also means that the invoked endpoint has not the power to fix it, so it will only complain.

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 = {}) ⇒ AntError

Returns a new instance of AntError.



64
65
66
67
68
# File 'lib/ant/exceptions.rb', line 64

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