* it is every other state.
*
* @return void
- * @throws InvalidStateException If the state is not 'active'
+ * @throws UnexpectedStateException If the state is not 'active'
*/
public function validateMinerStateIsActive () {
// Just compare it...
if (!$this instanceof MinerActiveState) {
// Throw the exception
- throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
+ throw new UnexpectedStateException($this, self::EXCEPTION_INVALID_STATE);
} // END - if
}
* it is every other state.
*
* @return void
- * @throws InvalidStateException If the state is not 'init'
+ * @throws UnexpectedStateException If the state is not 'init'
*/
public function validateMinerStateIsInit () {
// Just compare it...
if (!$this instanceof MinerInitState) {
// Throw the exception
- throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
+ throw new UnexpectedStateException($this, self::EXCEPTION_INVALID_STATE);
+ } // END - if
+ }
+
+ /**
+ * Validates whether the state is 'booting' or throws an exception if
+ * it is every other state.
+ *
+ * @return void
+ * @throws UnexpectedStateException If the state is not 'booting'
+ */
+ public function validateMinerStateIsBooting () {
+ // Just compare it...
+ if (!$this instanceof MinerBootingState) {
+ // Throw the exception
+ throw new UnexpectedStateException($this, self::EXCEPTION_INVALID_STATE);
} // END - if
}