Exception: OsCtl::Repo::NetworkError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/osctl/repo/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ NetworkError

Returns a new instance of NetworkError.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/osctl/repo/exceptions.rb', line 27

def initialize(exception)
  @original_exception = exception

  super(
    if exception.respond_to?(:message)
      exception.message
    else
      exception.to_s
    end
  )
end

Instance Attribute Details

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



25
26
27
# File 'lib/osctl/repo/exceptions.rb', line 25

def original_exception
  @original_exception
end