Exception: ProcessFailed

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

Direct Known Subclasses

ConcurrentStreamProcessFailed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid = Process.pid, msg = nil) ⇒ ProcessFailed

Returns a new instance of ProcessFailed.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/scout/exceptions.rb', line 24

def initialize(pid = Process.pid, msg = nil)
  @pid = pid
  @msg = msg
  if @pid
    if @msg
      message = "Process #{@pid} failed - #{@msg}"
    else
      message = "Process #{@pid} failed"
    end
  else
    message = "Failed to run #{@msg}"
  end
  super(message)
end

Instance Attribute Details

#msgObject

Returns the value of attribute msg.



23
24
25
# File 'lib/scout/exceptions.rb', line 23

def msg
  @msg
end

#pidObject

Returns the value of attribute pid.



23
24
25
# File 'lib/scout/exceptions.rb', line 23

def pid
  @pid
end