Exception: Takagi::Errors::TakagiError

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

Overview

Base error class for Takagi-specific errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, context: {}, suggestions: []) ⇒ TakagiError

Returns a new instance of TakagiError.



18
19
20
21
22
# File 'lib/takagi/errors.rb', line 18

def initialize(message, context: {}, suggestions: [])
  @context = context
  @suggestions = suggestions
  super(build_message(message))
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



16
17
18
# File 'lib/takagi/errors.rb', line 16

def context
  @context
end

#suggestionsObject (readonly)

Returns the value of attribute suggestions.



16
17
18
# File 'lib/takagi/errors.rb', line 16

def suggestions
  @suggestions
end