I'm finding recently that when i get an exception, Visual Studio .net always tells me that it occurred at the line 'Application.Run(new Form1());'. this is true from a certain prespective, but not very helpful. how can i make it be a little more presice?
try
{
the code you want to execute
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
finally
{
destruction of the object variables that you don't need
}
i know how to use try and catch, that's not what i'm asking. how can i make visual studio tell me the correct line number for the location of an error, rather the the line number of 'Application.Run(new Form1());'??
it's not chip. i know where it's happening. in fact, i can always work it out - but i'd work it out faster if i were told. i'm sure it used to be more precise, i thought that i might have pressed something daft.
javac always used to give fantasticly detailed error reports that detailed the whereabouts of the error in every class involved - a great list of errors, but it was always obvious which one was yours (actually, it probably still does. but not for me, i don't really program any java now).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.