I try to figure out how to get error events through xpcom like trying
to navigate to a file which does not exists. What I expect is an event
about the navigation was unsuccessful because of the file existence.

nsIWebProgressListener.OnStateChange never ever gets called with the
invalid uri, but the nsIWebProgressListener.OnLocationChange with
success status. Any ideas how to detect the result ?

Thanks in advance.