67: def raise_early_exceptions
68: raise NoMachinesConfig unless @@config.machines
69:
70:
71: if run?
72: if @@global.position.nil?
73: raise MachineGroupNotRunning, current_machine_group unless Rudy::Machines.running?
74: else
75: unless Rudy::Machines.running? @@global.position
76: m = Rudy::Machine.new @@global.position
77: raise MachineNotRunning, m.name
78: end
79: end
80: end
81:
82:
83:
84:
85:
86:
87: if @routine
88: bad = @routine.keys - @@allowed_actions
89: raise UnsupportedActions.new(@name, bad) unless bad.empty?
90: end
91: end