Results 1 to 3 of 3

Thread: Error Module or Class

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254

    Error Module or Class

    Hi,
    I am trying to implement a reasonably re-usable error trapping mechanism in VB6. My question concerns whether I should have a error ( my_error ) class and instantiate a new my_error object, and implement specific methods associate with the object, or simpy have a module tied to the project.

    I can see the benfits of the class implementation, modularity and so on, but is there an extensive overhead creating new my_error ?

    Thanks in advance.

    Lenin

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    I would advise you to go for a module inserted in your project. Creating a DLL or a class file is worth going for if the error handling code is not going to change and is to be used by many applications.

    If you have a module inserted in your project, you can modify it as many times as you want, without worrying about the compatibility issues. All you are going to do is pass the error number or the error object and handle it inside the sub. You don't really need a class file to do that.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254
    No,
    I don't really need it as such, but the flexibility of having a class makes the task more modular. I agree a module is simpler. I am mostly interested in the overheads involved.

    thanks

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