Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

vb.net Error Object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred Nelson - 26 Oct 2004 02:17 GMT
Hi:

I'm writing an error handling routine for my VB.NET program.  I have a
routine that is called when an error occurs using "on error goto' as in a
class library which then loads the first form in the system.

When I encounter an error I'm using err.number for the error number,
err.description for the description of what went wrong.

What I really need to complete the process is the name of the form on which
the error occurred and the line number.

I would really appreciate it if someone knows how to obtain this
information - or if there are additional steps that I need to take in each
form to collect it.

Thanks,

Fred
jjardine - 26 Oct 2004 03:02 GMT
> Hi:
>
[quoted text clipped - 16 lines]
>
> Fred

Any thought of using Try Catch blocks instead of using On Error GoTo?

In regards to the err line information   there was a function      ERL
that would report line numbers     Here is some info on it..
http://www.awprofessional.com/articles/article.asp?p=25180     Good luck
Fred Nelson - 26 Oct 2004 03:23 GMT
Hi Jjardine:

I need to trap completely unexpected errors (such as bad indexes) so the try
/ catch / end try block won't help me with this function.  I've used it
where appropriate - such as database access.

Since my startup and error trapping occurs in a class library the ERL
function always returns a line number of zero.  I'm hoping to get the form
that caused the error along with the line number for quick debugging should
there be a crash.

If you have any ideas they would be greatly appreciated!

Thanks,

Fred

> > Hi:
> >
[quoted text clipped - 22 lines]
> that would report line numbers     Here is some info on it..
> http://www.awprofessional.com/articles/article.asp?p=25180     Good luck

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.