Exception: ChildProcessError

Inherits:
RuntimeError
  • Object
show all
Defined in:
Library/Homebrew/exceptions.rb

Overview

Raised when a child process sends us an exception over its error pipe.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inner) ⇒ ChildProcessError

Returns a new instance of ChildProcessError.


628
629
630
631
632
633
634
635
636
637
638
639
# File 'Library/Homebrew/exceptions.rb', line 628

def initialize(inner)
  @inner = inner
  @inner_class = Object.const_get inner["json_class"]

  super <<~EOS
    An exception occurred within a child process:
      #{inner_class}: #{inner["m"]}
  EOS

  # Clobber our real (but irrelevant) backtrace with that of the inner exception.
  set_backtrace inner["b"]
end

Instance Attribute Details

#innerObject (readonly)

Returns the value of attribute inner


626
627
628
# File 'Library/Homebrew/exceptions.rb', line 626

def inner
  @inner
end

#inner_classObject (readonly)

Returns the value of attribute inner_class


626
627
628
# File 'Library/Homebrew/exceptions.rb', line 626

def inner_class
  @inner_class
end