Exception: ProcessFailed

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rbbt/util/misc/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.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rbbt/util/misc/exceptions.rb', line 15

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.



14
15
16
# File 'lib/rbbt/util/misc/exceptions.rb', line 14

def msg
  @msg
end

#pidObject

Returns the value of attribute pid.



14
15
16
# File 'lib/rbbt/util/misc/exceptions.rb', line 14

def pid
  @pid
end