Throw a RouterException if no suitable route was found

develop
Sven Slootweg 12 years ago
parent c62d6a9cec
commit 533148edb1

@ -13,6 +13,8 @@
cphp_dependency_provides("cphp_router", "1.1");
class RouterException extends Exception {}
class CPHPRouter extends CPHPBaseClass
{
public $routes = array();
@ -139,5 +141,10 @@ class CPHPRouter extends CPHPBaseClass
}
}
}
if($found === false)
{
throw new RouterException("No suitable route found");
}
}
}

Loading…
Cancel
Save