No longer throwing deprecated exceptions
[shipsimu.git] / application / ship-simu / main / class_WorksContract.php
index 64333f6bbc02e522a96a77edafedd69629a54e3f..424cd8b77affc288c0d5e31ae6b6553c9d8c7f4a 100644 (file)
@@ -255,7 +255,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                        throw new NullPointerException($shipInstance, self::EXCEPTION_IS_NULL_POINTER);
                } elseif (!is_object($shipInstance)) {
                        // Not an object! ;-(
-                       throw new NoObjectException($shipInstance, self::EXCEPTION_IS_NO_OBJECT);
+                       throw new InvalidObjectException($shipInstance, self::EXCEPTION_IS_NO_OBJECT);
                } elseif (!$shipInstance instanceof ConstructableShip) {
                        // Does not have the required feature (method)
                        throw new ShipIsInvalidException(array($shipInstance), self::EXCEPTION_INVALID_SHIP_INSTANCE);
@@ -284,7 +284,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                                throw new NullPointerException($item, self::EXCEPTION_IS_NULL_POINTER);
                        } elseif (!is_object($item)) {
                                // Not an object! ;-(
-                               throw new NoObjectException($item, self::EXCEPTION_IS_NO_OBJECT);
+                               throw new InvalidObjectException($item, self::EXCEPTION_IS_NO_OBJECT);
                        } elseif (!$item instanceof BaseSimulator) {
                                // Does not have the required feature (method)
                                throw new MissingMethodException(array($item, 'getPartInstance'), self::EXCEPTION_MISSING_METHOD);
@@ -299,7 +299,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                                throw new NullPointerException($part, self::EXCEPTION_IS_NULL_POINTER);
                        } elseif (!is_object($part)) {
                                // Not an object! ;-(
-                               throw new NoObjectException($part, self::EXCEPTION_IS_NO_OBJECT);
+                               throw new InvalidObjectException($part, self::EXCEPTION_IS_NO_OBJECT);
                        } elseif (!method_exists($part, 'getPrice')) {
                                // Does not have the required feature (method)
                                throw new MissingMethodException(array($part, 'getPrice'), self::EXCEPTION_MISSING_METHOD);