Throw better Exceptions

This commit is contained in:
Phill Sparks
2011-11-15 12:35:04 +00:00
parent d643ec97dc
commit 58638216e8
23 changed files with 53 additions and 53 deletions

View File

@@ -39,7 +39,7 @@ abstract class Controller {
{
if (strpos($destination, '@') === false)
{
throw new \Exception("Route delegate [{$destination}] has an invalid format.");
throw new \InvalidArgumentException("Route delegate [{$destination}] has an invalid format.");
}
list($controller, $method) = explode('@', $destination);
@@ -226,7 +226,7 @@ abstract class Controller {
return IoC::resolve($key);
}
throw new \Exception("Attempting to access undefined property [$key] on controller.");
throw new \OutOfBoundsException("Attempting to access undefined property [$key] on controller.");
}
}