James Newell wrote:
Neither of these return a error in the browser element, rather display an
exception in the javascript console.

That happens too, if the caller doesn't catch the exception, yes. They are also supposed to show either an error alert or an error page. What error did you throw?

In the documentation I could not find
asyncOpen, the method you were refering to throw from, rather it was on the
nsIChannel

Yes.

not nsIProtocolHandler.

Is your protocol handler returning some other random channels, basically?

If I implement nsIChannel and throw will this return the standard file not 
found error?

It'll return whatever error you throw.

How do the other protocols return the error box or page?

They throw from AsyncOpen or pass an error status to OnStopRequest. Docshell then handles reporting the error, IF it's an error status it knows about.

Another related issue, as I am returning a file channel when files are found,
the actual file URL is stored in the history. Also this means that other
files in the page try to load from the file protocol. How can I mask this?
I'm guessing I need to implement nsIChannel?

Yep. You can even use a file channel internally to get the data, but your channel will report the URI that it was originally created from, etc.

-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to