Fix problem when exception is thrown

Currently, when an exception is thrown in the apllication, the current callback does not behave correctly. The issue comes from the Route::currentRouteName call. Changing the if condition fix the problem for me.