Throw better Exceptions
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user