Is there a list of catch values that get thrown?
Catch Errors
Started by Chan, Jul 15 2006 09:06 AM
5 replies to this topic
#1
Posted 15 July 2006 - 09:06 AM
|
|
|
#2
Posted 17 July 2006 - 05:25 AM
i think what you want to know is...
say you have a pile of code thats giving you hell. and you want to find out where its going bad, throw a try catch around it here is what its gonna look like:
try
{
the code thats messed up.....
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
say you have a pile of code thats giving you hell. and you want to find out where its going bad, throw a try catch around it here is what its gonna look like:
try
{
the code thats messed up.....
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
#3
Guest_NeedHelp_*
Posted 17 July 2006 - 12:20 PM
Guest_NeedHelp_*
Are you looking for a list on the web or are you looking for howto do it like hoser2001 stated above?
#4
Posted 17 July 2006 - 02:46 PM
I'd like a list of errors. I think I am catching them right. My code looks similar to yours hoser2001.
#5
Posted 17 July 2006 - 03:22 PM
I think what you want is is...
instead of:
ex.Message
you want:
ex.Stacktrace
This will give you a more detailed explanation of the errors if you will....
instead of:
ex.Message
you want:
ex.Stacktrace
This will give you a more detailed explanation of the errors if you will....
#6
Posted 18 July 2006 - 03:02 AM
Hmmm...I suppose you want a general list of Exceptions? MSDN should have a list somewhere, though I don't know how well organized it is. Of course, if you're using libraries or such, they've probably defined their own exceptions as well.
Or, if you're asking for checked exceptions (what a particular function can throw), you're out of luck. .NET doesn't do checked exceptions, though Java does.
BTW, I normally just do ex.ToString() which will give both the message and the stack trace.
Edit: Exception Helper will parse the XML doc tags, and automatically insert catch blocks for you...it's VB2005 only, though.
Or, if you're asking for checked exceptions (what a particular function can throw), you're out of luck. .NET doesn't do checked exceptions, though Java does.
BTW, I normally just do ex.ToString() which will give both the message and the stack trace.
Edit: Exception Helper will parse the XML doc tags, and automatically insert catch blocks for you...it's VB2005 only, though.


Sign In
Create Account


Back to top









