caught wrong navigation url

Hi all,

I am new to vaadin framework.
I have implement the Navigator class to navigate between different view.
When I try to change manually the url, I get this exception

java.lang.IllegalArgumentException: Trying to navigate to an unknown state ‘/devicesss’ and an error view provider not present
at com.vaadin.navigator.Navigator.navigateTo(Navigator.java:528)
at com.vaadin.navigator.Navigator$UriFragmentManager.uriFragmentChanged(Navigator.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

How can I check every time the URL and how can I catch all exception in the application and display it to user. I am using version 7.1.7.

Thanks

You try to navigate to an URL, there is no defined view for. Set error view to your navigator: navigator.setErrorView(defaultView);

This view will be displayed always the unknown URL is provided.
You can also add
ViewChangeListener
to you navigator and check the URL in
beforeViewChange(ViewChangeEvent event)
method.