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



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

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



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

def inner
  @inner
end

#inner_classObject (readonly)

Returns the value of attribute inner_class



610
611
612
# File 'brew/Library/Homebrew/exceptions.rb', line 610

def inner_class
  @inner_class
end