Home All Groups Group Topic Archive Search About

Process.Start throws exception when starting firefox after firefox crashes

Author
23 Oct 2007 8:24 PM
Gene Chang
I have an application that starts the default browser by using
Process.Start(URL).  The one time that I get a file not found
exception is when Firefox has crashed and comes up with the "Firefox -
Restore Previous Session" screen.

It does seem to start up but for some reason an exception is thrown
because the browser hasn't started. 

Does anyone know why I get the exception in this case?  I don't want
to just eat the exception because the thing I start isn't necessarily
a URL.  It could be any format that may not have a default
application.  In that case, I want to notify the user that there isn't
anything to handle it.

Thanks.

Gene Chang

Author
24 Oct 2007 3:44 PM
cokkiy
Maybe the url is in bad format.
Show quote
"Gene Chang" <genechangspam_REMOVEME@yahoo.com> ????
news:kalsh3pffkt1g6m4m5j2qbt34446igpgkn@4ax.com...
>I have an application that starts the default browser by using
> Process.Start(URL).  The one time that I get a file not found
> exception is when Firefox has crashed and comes up with the "Firefox -
> Restore Previous Session" screen.
>
> It does seem to start up but for some reason an exception is thrown
> because the browser hasn't started.
>
> Does anyone know why I get the exception in this case?  I don't want
> to just eat the exception because the thing I start isn't necessarily
> a URL.  It could be any format that may not have a default
> application.  In that case, I want to notify the user that there isn't
> anything to handle it.
>
> Thanks.
>
> Gene Chang
Author
25 Oct 2007 6:26 PM
Gene
Nope.  The URL format is fine.  It looks like it might be a known
Firefox issue.  I get the file not found error, but Firefox still
opens properly with the correct page.  What I'm going to do is to
detect if firefox is the default http application.  If it is and the
error is 2 (file not found), then I'm going to eat the exception.  Not
sure if there is any other way...

Thanks.

Gene

Show quote
On Oct 24, 11:44 am, "cokkiy" <cok***@gmail.com> wrote:
> Maybe the url is in bad format.
> "Gene Chang" <genechangspam_REMOV...@yahoo.com> ????news:kalsh3pffkt1g6m4m5j2qbt34446igp***@4ax.com...
>
> >I have an application that starts the default browser by using
> > Process.Start(URL).  The one time that I get a file not found
> > exception is when Firefox has crashed and comes up with the "Firefox -
> > Restore Previous Session" screen.
>
> > It does seem to start up but for some reason an exception is thrown
> > because the browser hasn't started.
>
> > Does anyone know why I get the exception in this case?  I don't want
> > to just eat the exception because the thing I start isn't necessarily
> > a URL.  It could be any format that may not have a default
> > application.  In that case, I want to notify the user that there isn't
> > anything to handle it.
>
> > Thanks.
>
> > Gene Chang

AddThis Social Bookmark Button