107: def raise_early_exceptions
108: raise NoMachinesConfig unless @@config.machines
109:
110:
111: raise MachineGroupNotDefined, current_machine_group unless known_machine_group?
112:
113:
114: if run?
115: raise MachineGroupNotRunning, current_machine_group unless Rudy::Machines.running?
116: end
117:
118: if @routine
119: bad = @routine.keys - @@allowed_actions
120: raise UnsupportedActions.new(@name, bad) unless bad.empty?
121: end
122:
123: if @machines
124: down = @@rset.boxes.select { |box| !box.stash.instance_running? }
125: raise GroupNotAvailable, down unless down.empty?
126: end
127:
128: end