class T2Server::RunStateError

Raised if an operation is performed on a run when it is in the wrong state. Trying to start a run if it is the finished state would cause this exception to be raised.

Public Class Methods

new(current, need) click to toggle source

Create a new RunStateError specifying both the current state and that which is needed to run the operation.

# File lib/t2-server/exceptions.rb, line 176
def initialize(current, need)
  super "The run is in the wrong state (#{current}); it should be " +
    "'#{need}' to perform that action"
end