Custom Error Handling Class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elmbrook
    New Member
    • Feb 2010
    • 15

    Custom Error Handling Class

    Hi

    I would like to create a custom error handling class and am not sure how to go about it.

    Try/Catch statements work however, if I am outside of that statement then the VS2008 debugger comes up.

    I would like to create my own class to handle any/every exception so that I can display back to the user what the error is, where it has happened (Form Name), Line Number and a box for them to write in what they did to cause the error.

    Is this possible in C#?

    Any help is really appreciated.

    Thanks.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Where are you putting the try-catch?
    Is it around the contents of the main function in your main class?

    Comment

    • elmbrook
      New Member
      • Feb 2010
      • 15

      #3
      I would like to get a general Exception handler.

      I don't want to put try and catches around everything?

      In other programming languages I have created a general exception handler class that handle all errors and exceptions.

      I was wondering if there was any general Exception handler classes in C#.

      Something that would have to be a generic custom built class.

      Comment

      Working...