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.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/scout/exceptions.rb', line 18

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.



17
18
19
# File 'lib/scout/exceptions.rb', line 17

def msg
  @msg
end

#pidObject

Returns the value of attribute pid.



17
18
19
# File 'lib/scout/exceptions.rb', line 17

def pid
  @pid
end