Added extra Exceptions

This commit is contained in:
Shoghi Cervantes
2014-10-28 21:07:12 +01:00
parent b6f7ee20fc
commit 8c4faa8622
37 changed files with 215 additions and 87 deletions

View File

@ -44,11 +44,11 @@ class ShapelessRecipe implements Recipe{
*
* @returns ShapelessRecipe
*
* @throws \Exception
* @throws \InvalidArgumentException
*/
public function addIngredient(Item $item){
if(count($this->ingredients) >= 9){
throw new \Exception("Shapeless recipes cannot have more than 9 ingredients");
throw new \InvalidArgumentException("Shapeless recipes cannot have more than 9 ingredients");
}
$it = clone $item;