Login | Register   
RSS Feed
Download our iPhone app
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
Jan 19, 2000



Application Security Testing: An Integral Part of DevOps

Maintain Call Stack for Error Tracing

I program all reusable components into DLLs or OCXs. To provide a consistent error-handling technique across all my projects, I use the Raise method of the Err object in all these components and display the error only in the code module of first entry—such as Command1_Click. Because an error can be generated several layers deep in the code, I propagate the location of the error using this Raise statement in all my reusable components:
	Err.Raise Err.Number, "ThisProc" & vbCr & Err.Source
Exit Sub
This way, the whole call stack is returned to—and can be displayed in—the calling procedure (through Err.Source), making errors much easier to find and solve.
Harvey Flaisher
Comment and Contribute






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



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