Fix Router.php to behave on App::error

When App::error is triggered, Route is empty. When you try to access Route::currentRouteNamed($string), it fails because Route::current() is empty and does not have a getName() method.
Merge pull request #3046 from fedeisas/patch-3

Fix Router.php to behave on App::error