473,382 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

vb.net Error Object

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
Nov 21 '05 #1
2 1783

"Fred Nelson" <fr**@smartybird.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
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


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/articl...le.asp?p=25180 Good luck
Nov 21 '05 #2
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

"jjardine" <jj******@bellsouth.net> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...

"Fred Nelson" <fr**@smartybird.com> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
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


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/articl...le.asp?p=25180 Good luck

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
2
by: B_Love | last post by:
Hey! When trying to compile the code for a ordered vector class I get the following error: undefined reference to `WinMain@16' Anyone have any idea what I might be doing wrong? I've been...
2
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to...
0
by: Dirk Försterling | last post by:
Hi all, a few days ago, I upgraded from PostgreSQL 7.2.1 to 7.4, following the instructions in the INSTALL file, including dump and restore. All this worked fine without any error (message). ...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. ...
11
by: xenoix | last post by:
hey there, im reasonably new to C# and im currently writing a backup application which im using as a learning resource. My PC :- Visual Studio 2005 .NET Framework 2 Component Factory Krypton...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.