By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,761 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,761 IT Pros & Developers. It's quick & easy.

Catching Exceptions central - is it possible?

P: n/a
Hi,

as yet i have readed in the MSDN about exception handling. The only
references that i was founded, described try, catch, finally and throw
objects.

But I am searching about an occation to catch exceptions central, maybe, the
framework call a central function of each class, when there is throw a
exception. The reason is, that i do not need try, catch... blocks and
therefore the sourcecode will be going to unreadable.

Do exist an solution?

Thanks in advance,
Hubert
Nov 15 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Check out this example on GotDotNet
http://samples.gotdotnet.com/quickst...FormsAppErrorH
andler.aspx
In your application design you might want to register an exception handler
for any exceptions you have not handled in your application. You can create
an exception handler for your unhandled exceptions by calling the
Application.AddOnThreadException method and passing in a reference to a
method in your application. This method will then be called for any
unhandled exceptions on that thread. The OnThreadException event is raised
when the Windows Forms window procedure receives an exception.

Windows Forms provides a default exception handler and exception handling
dialog named ThreadExceptionDialog. This dialog can be used during
development, but you will want to supply your own custom exception handlers
for your application when it is near completion.
--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"Hubert Hermanutz" <hh********@kavo.de> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
Hi,

as yet i have readed in the MSDN about exception handling. The only
references that i was founded, described try, catch, finally and throw
objects.

But I am searching about an occation to catch exceptions central, maybe, the framework call a central function of each class, when there is throw a
exception. The reason is, that i do not need try, catch... blocks and
therefore the sourcecode will be going to unreadable.

Do exist an solution?

Thanks in advance,
Hubert

Nov 15 '05 #2

P: n/a
Take a look at the Robbins book "Debugging Applications for .NET and
Windows"

On Mon, 8 Dec 2003 14:02:40 +0100, "Hubert Hermanutz"
<hh********@kavo.de> wrote:
Hi,

as yet i have readed in the MSDN about exception handling. The only
references that i was founded, described try, catch, finally and throw
objects.

But I am searching about an occation to catch exceptions central, maybe, the
framework call a central function of each class, when there is throw a
exception. The reason is, that i do not need try, catch... blocks and
therefore the sourcecode will be going to unreadable.

Do exist an solution?

Thanks in advance,
Hubert


Nov 16 '05 #3

P: n/a
Take a look at the Robbins book "Debugging Applications for .NET and
Windows"

On Mon, 8 Dec 2003 14:02:40 +0100, "Hubert Hermanutz"
<hh********@kavo.de> wrote:
Hi,

as yet i have readed in the MSDN about exception handling. The only
references that i was founded, described try, catch, finally and throw
objects.

But I am searching about an occation to catch exceptions central, maybe, the
framework call a central function of each class, when there is throw a
exception. The reason is, that i do not need try, catch... blocks and
therefore the sourcecode will be going to unreadable.

Do exist an solution?

Thanks in advance,
Hubert


Nov 16 '05 #4

P: n/a
Take a look at the Robbins book "Debugging Applications for .NET and
Windows"

On Mon, 8 Dec 2003 14:02:40 +0100, "Hubert Hermanutz"
<hh********@kavo.de> wrote:
Hi,

as yet i have readed in the MSDN about exception handling. The only
references that i was founded, described try, catch, finally and throw
objects.

But I am searching about an occation to catch exceptions central, maybe, the
framework call a central function of each class, when there is throw a
exception. The reason is, that i do not need try, catch... blocks and
therefore the sourcecode will be going to unreadable.

Do exist an solution?

Thanks in advance,
Hubert


Nov 16 '05 #5

P: n/a
Take a look at the Robbins book "Debugging Applications for .NET and
Windows"

On Mon, 8 Dec 2003 14:02:40 +0100, "Hubert Hermanutz"
<hh********@kavo.de> wrote:
Hi,

as yet i have readed in the MSDN about exception handling. The only
references that i was founded, described try, catch, finally and throw
objects.

But I am searching about an occation to catch exceptions central, maybe, the
framework call a central function of each class, when there is throw a
exception. The reason is, that i do not need try, catch... blocks and
therefore the sourcecode will be going to unreadable.

Do exist an solution?

Thanks in advance,
Hubert


Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.