-
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
-
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.
.
-
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