Exception: ChildProcessError

Inherits:
RuntimeError
  • Object
show all
Defined in:
brew/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



610
611
612
613
614
615
616
617
618
619
620
621
# File 'brew/Library/Homebrew/exceptions.rb', line 610

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



607
608
609
# File 'brew/Library/Homebrew/exceptions.rb', line 607

def inner
  @inner
end

#inner_classObject (readonly)

Returns the value of attribute inner_class



608
609
610
# File 'brew/Library/Homebrew/exceptions.rb', line 608

def inner_class
  @inner_class
end