Throwing Nice Exceptions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a point in my code where I can get an exception if the network is not
available. This exception is kind of ugly for the user to see. I'd like to
catch and throw new exception that contains only my error string and an OK
button. If I say throw new System.Exception("The network is not available,
the list will not contain data."), the user sees text they don't need to see,
and they have to choose between break and continue buttons.

Any ideas?
 
randy1200 said:
I have a point in my code where I can get an exception if the network is
not
available. This exception is kind of ugly for the user to see. I'd like to
catch and throw new exception that contains only my error string and an OK
button. If I say throw new System.Exception("The network is not available,
the list will not contain data."), the user sees text they don't need to
see,
and they have to choose between break and continue buttons.

Any ideas?

Maybe I misunderstand something, but why don't you just catch the exception
and handle it the way you like it.

Marcus
 
I have a point in my code where I can get an exception if the network is
not
available. This exception is kind of ugly for the user to see. I'd like to
catch and throw new exception that contains only my error string and an OK
button. If I say throw new System.Exception("The network is not available,
the list will not contain data."), the user sees text they don't need to
see,
and they have to choose between break and continue buttons.

Exception with an OK button is a very nice idea.
 
I have a point in my code where I can get an exception if the network
is not available. This exception is kind of ugly for the user to see.
I'd like to catch and throw new exception that contains only my error
string and an OK button. If I say throw new System.Exception("The
network is not available, the list will not contain data."), the user
sees text they don't need to see, and they have to choose between
break and continue buttons.

Any ideas?

That sounds interesting, how is that done?

Is there a C++ only equivalent?
 
Back
Top