473,386 Members | 1,738 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,386 software developers and data experts.

global errortrap possible?

Hi all,

I like to log all errors to a file.
I have tried to have a Try..Catch...End Try arround the Menu i start from
Sub Main but it does catch all exceptions (like oledb)

Whats the best way to solve this problem?

Rob


Nov 21 '05 #1
3 848
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

Also see "Re: How can I cast an exception to its own type when I don't know
what its type is?" thread from yesterday.

Jay Harlow has some excellent advice in it.

HTH,
Greg

"rob willaar" <r.*******@xs4all.nl> wrote in message
news:41*********************@news.xs4all.nl...
Hi all,

I like to log all errors to a file.
I have tried to have a Try..Catch...End Try arround the Menu i start from
Sub Main but it does catch all exceptions (like oledb)

Whats the best way to solve this problem?

Rob

Nov 21 '05 #2
* "rob willaar" <r.*******@xs4all.nl> scripsit:
I like to log all errors to a file.
I have tried to have a Try..Catch...End Try arround the Menu i start from
Sub Main but it does catch all exceptions (like oledb)


See Jay B. Harlow's explanation:

<URL:http://groups.google.de/groups?selm=e04jbmSiEHA.1384%40TK2MSFTNGP10.phx.gb l>

Exception Management Application Block for .NET
<URL:http://msdn.microsoft.com/netframework/downloads/samples/?pull=/library/en-us/dnbda/html/emab-rm.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Hi Greg and Herfried,

Thanks!
"rob willaar" <r.*******@xs4all.nl> schreef in bericht
news:41*********************@news.xs4all.nl...
Hi all,

I like to log all errors to a file.
I have tried to have a Try..Catch...End Try arround the Menu i start from
Sub Main but it does catch all exceptions (like oledb)

Whats the best way to solve this problem?

Rob

Nov 21 '05 #4

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

Similar topics

2
by: dennis.eklund | last post by:
Hi... I have a question that about global.asa and including a custom made class. Wonder if it's possible and if so, how? What I want is to set up my class global for the site, I made a asp...
2
by: Otto Wyss | last post by:
I have a string variable g_appname which should be global accessable by any class who whishes. I have defined it as wxString *g_appname = NULL; and fills it later on. Now a friend asked why I...
33
by: MLH | last post by:
I've read some posts indicating that having tons of GV's in an Access app is a bad idea. Personally, I love GVs and I use them (possibly abuse them) all the time for everything imaginable - have...
11
by: Capstar | last post by:
Hi, I am working on an application, which will run embedded without an OS. The app is build up out of a couple of well defined parts. At first I wanted to keep those parts seperated and use...
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
8
by: chellappa | last post by:
hi Everybody ! decalaring variable in a.h and using that vaaariable in a1.c and inalization is in main.c it is possible .........pleaase correct that error is it Possible? i am trying it...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
11
by: tuom.larsen | last post by:
Dear list, I'm writing very simple state machine library, like this: _state = None def set_state(state): global _state _state = state
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
3
by: Peter Larsen [CPH] | last post by:
Hi, I have a problem where the code in Global.asax.cs runs before the unittests (on test of course). In the global file, i load some data from a Oracle table and save it in...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.