Exception: Pathway::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pathway.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, message: nil, details: nil) ⇒ Error

Returns a new instance of Error.



40
41
42
43
44
# File 'lib/pathway.rb', line 40

def initialize(type:, message: nil, details: nil)
  @type    = type.to_sym
  @message = message || default_message_for(type)
  @details = details || {}
end

Instance Attribute Details

#detailsObject (readonly) Also known as: errors

Returns the value of attribute details.



31
32
33
# File 'lib/pathway.rb', line 31

def details
  @details
end

#messageObject (readonly) Also known as: error_message

Returns the value of attribute message.



31
32
33
# File 'lib/pathway.rb', line 31

def message
  @message
end

#typeObject (readonly) Also known as: error_type

Returns the value of attribute type.



31
32
33
# File 'lib/pathway.rb', line 31

def type
  @type
end