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

@@ -145,7 +145,7 @@ class IoC {
if ( ! static::registered($name))
{
throw new \Exception("Error resolving [$name]. No resolver has been registered in the container.");
throw new \OutOfBoundsException("Error resolving [$name]. No resolver has been registered in the container.");
}
$object = call_user_func(static::$registry[$name]['resolver'], $parameters);
@@ -165,4 +165,4 @@ class IoC {
* loaded since there isn't any reason to load the container
* configuration until the class is first requested.
*/
IoC::bootstrap();
IoC::bootstrap();