class Ant::Exceptions::AntBaseException

Exception used as standard error on this gem. @param message. This param is meant to be read by another developer

It would be nice if the message were self descriptive
enough so the developer won't need to ask the creator
of the app for help.

@param code. The code is similar to message, but for this case

it is meant to be used for the program to handle
exceptions and to make easier to identify the exception..
The default is the exception class, so it won't change
almost never.

@param data. Contains additional data to detail the error.

Attributes

code[R]
data[R]
message[R]

Public Class Methods

new(message, code, data) click to toggle source
# File lib/ant/exceptions.rb, line 20
def initialize(message, code, data)
  @message = message
  @code = code
  @data = data
end

Public Instance Methods

to_h() click to toggle source
# File lib/ant/exceptions.rb, line 30
def to_h
  {
    message: message,
    code: code,
    data: data,
    backtrace: backtrace
  }
end
to_log_format() click to toggle source
# File lib/ant/exceptions.rb, line 26
def to_log_format
  to_h.merge(class: self.class.name)
end