dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 6, 1997

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Error Handling In A Class Module

To signal errors from within a class method, use the Error.Raise method and bubble it back up to the server. Check the docs for Error.Raise and the books online. One caveat is that errors in Class_Initialize and Class_Terminate do not bubble back up. Like errors in an event procedure of a form module, they're not in the client's call tree. If they are untrapped, the OLE server will terminate abruptly. On an out-of-process server, your client will be left with invalid references. If your server is in-process (an OLE DLL), the situation is much more serious because your client will also terminate abruptly. (When you're in the same process, your fatal errors are your client's fatal errors.) Therefore, always protect Class_Initialize and Class_Terminate with bulletproof error-trapping, and never raise errors in them.
A. Nicklas
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date