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

@ -22,6 +22,7 @@
namespace pocketmine\level;
use pocketmine\math\Vector3;
use pocketmine\utils\LevelException;
class Position extends Vector3{
@ -139,11 +140,11 @@ class Position extends Vector3{
*
* @return Position
*
* @throws \RuntimeException
* @throws LevelException
*/
public function getSide($side, $step = 1){
if(!$this->isValid()){
throw new \RuntimeException("Undefined Level reference");
throw new LevelException("Undefined Level reference");
}
return Position::fromObject(parent::getSide($side, $step), $this->level);