Ask the Expert

Differences between a trap and an interrupt?

What are the differences between a trap and an interrupt? What is the use of each function?
This brings me back quite a way... Introduction to Computer Science (101). A trap is program logic that you would write to catch, or "trap", and error as it occurs. In the Notes world you would implement a trap with an "On Error" statement inside a LotusScript Agent. Search in Designer Help for "trap" to get all the specifics from the Lotus Notes perspective. An interrupt is an event within a program that suspends normal processing and temporarily diverts the flow of control to some other routine, which is typically refered to as an interrupt handler. The Notes client and Domino server software provides you with several interrupts when interacting with databases, view and documents. Any time you open or save a Notes document you have the option of interrupting the normal/simple save by calling some code such as QueryOpen and QuerySave. You can think of the code you write inside a Form's QueryOpen and QuerySave as an interrupt handler.

This was first published in December 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: