Skip to content

Commit

Permalink
makes exceptions slightly more helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
henderjon committed Oct 27, 2014
1 parent b2fae8c commit f8c2e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ function dispatch( RouteInterface $route ){
$fqnsc .= trim($route->getController(), "\\");

if(!class_exists($fqnsc)){
throw new ControllerNotFoundException;
throw new ControllerNotFoundException("Requested: {$fqnsc}");
}

$instance = new \ReflectionClass($fqnsc);

if(!$instance->implementsInterface(__NAMESPACE__ . "\\DispatchableInterface")){
throw new NonDispatchableObjectException;
throw new NonDispatchableObjectException("Requested: {$fqnsc}");
}

$object = $instance->newInstance($this->di, $route);
Expand Down

0 comments on commit f8c2e35

Please sign in to comment.