Exception: Llull::ResultError

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

Overview

Custom exception for Result errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_type, error_data) ⇒ ResultError

Returns a new instance of ResultError.



235
236
237
238
239
# File 'lib/llull/result.rb', line 235

def initialize(error_type, error_data)
  @error_type = error_type
  @error_data = error_data
  super("Result failure: #{error_type} - #{error_data}")
end

Instance Attribute Details

#error_dataObject (readonly)

Returns the value of attribute error_data.



233
234
235
# File 'lib/llull/result.rb', line 233

def error_data
  @error_data
end

#error_typeObject (readonly)

Returns the value of attribute error_type.



233
234
235
# File 'lib/llull/result.rb', line 233

def error_type
  @error_type
end