Results 1 to 5 of 5

Thread: [Resolved] Error handling in class module

Threaded View

  1. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Error handling in class module

    Quote Originally Posted by vbXML
    Thanks much, plenderj! I heartly appreciate it.

    since it is a class I wanted to raise error to the calling application, is that okay?
    Yes.
    Quote Originally Posted by vbXML
    I like your idea of having a central method like "HandleError". Would it be a good idea to make it dll. May be add some error constants to it too.
    If you are going to use this in multiple applications, then again, I would say 'yes'.
    Quote Originally Posted by vbXML
    (But somewhere on this forum I read that a general method to handle error isn't advisible).
    A general method is just that, a GENERAL method. It would handle your garden variety type of errors, but such a practice is discouraged because you still wind up having to deal with errors that are specific to the way your code is written. Unless you want to spend the time writting a .Dll that will cover every single possible error that could ever occur in an application, you will always need specific error trapping written in.

    Of course, your .Dll could just be general. In other words, regardless of what the error is, you could just write it off to something and have the program continue. This would ensure that your program wouldn't bomb on a runtime error, but it probably wouldn't be very useful in attempting to determine what happened and why it happened.
    Last edited by Hack; Jun 21st, 2005 at 07:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width