Exception: Oso::Polar::Error

Inherits:
Error
  • Object
show all
Defined in:
lib/oso/polar/errors.rb

Overview

Base error type for Oso::Polar.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Error.

Parameters:

  • message (String) (defaults to: nil)
  • details (Hash) (defaults to: nil)


11
12
13
14
15
# File 'lib/oso/polar/errors.rb', line 11

def initialize(message = nil, details: nil)
  @details = details
  @stack_trace = details&.fetch('stack_trace', nil)
  super(message)
end

Instance Attribute Details

#stack_traceObject (readonly)

Returns the value of attribute stack_trace.



7
8
9
# File 'lib/oso/polar/errors.rb', line 7

def stack_trace
  @stack_trace
end