About Exception Handling 
Author Message
 About Exception Handling

Hi, I'm new to VB.NET programming. I need to know about exception
handling in .NET.
How to pass exceptions between different application types(Say an
exception raised by a form has to be dealt with in a different class
object) within 1 project, as I need to handle all the exceptions
raised by different modules, in 1 ErrorHandling class of the entire
application.

Any help would be very helpful.....

Benz.



Mon, 31 Jan 2005 20:43:07 GMT  
 About Exception Handling
An exception object is just an instance of a class, so you can pass the
object to your class as a parameter.  I built an entire tracing, error
reporting and logging system by passing the exceptions and stacktrace
information just that way.

HTH

David


Quote:
> Hi, I'm new to VB.NET programming. I need to know about exception
> handling in .NET.
> How to pass exceptions between different application types(Say an
> exception raised by a form has to be dealt with in a different class
> object) within 1 project, as I need to handle all the exceptions
> raised by different modules, in 1 ErrorHandling class of the entire
> application.

> Any help would be very helpful.....

> Benz.



Tue, 01 Feb 2005 06:21:37 GMT  
 About Exception Handling
Benz,
.NET supports global error handlers that are implemented as Event handlers.
There are three of them.

For Windows Forms look at:
    System.Windows.Forms.ThreadException event
    Use AddHandler in your Sub Main, or main form's Form_Load event

For ASP.NET look at:
    System.Web.HttpApplication.Error event
    Normally placed in your Global.asax file.

For console applications look at:
    System.AppDomain.UnhandledException event
    Use AddHandler in your Sub Main.

Hope this helps
Jay


Quote:
> Hi, I'm new to VB.NET programming. I need to know about exception
> handling in .NET.
> How to pass exceptions between different application types(Say an
> exception raised by a form has to be dealt with in a different class
> object) within 1 project, as I need to handle all the exceptions
> raised by different modules, in 1 ErrorHandling class of the entire
> application.

> Any help would be very helpful.....

> Benz.



Tue, 01 Feb 2005 09:29:40 GMT  
 About Exception Handling
Thankyou for your response.

Benz.



Tue, 01 Feb 2005 19:42:11 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Exception Handling

2. Exception Handling - the pragmatics

3. Exception Handling

4. In this case, what's the difference between CSharp and VB.NET Exception Handling

5. Best Practice for Exception Handling?

6. Exception Handling Help

7. Centralized exception handling

8. Exception handling MyClass.Name ?

9. Severe bug in Exception handling

10. Global Exception Handling

11. Applicationwide exception handling??

12. Exception handling & Logging

 

 
Powered by phpBB® Forum Software