Manage Learn to apply best practices and optimize your operations.

The best $$ReturnGeneralError

How to make integrated error handling look nice in a Domino Web application.

How does one integrate error handling in a Domino Web application and make it look good? Create a $$ReturnGeneralError form that will trap all errors generated by the Domino application. The form shall have two hidden fields:

  1. SaveOptions computed when composed to "0". This will unable any user to create a new document based on this form.
  2. MessageString having the default value MessageString. This field will contain the generated error massage.
Now put your JavaScript skills to work and write four simple lines:

The [MSG_disp] is a computed for display field containing this formula:
@ReplaceSubstring(MessageString; "-"; ":n")
Make the whole part pass though HTML, and you're done.

The finished result will display a pop-up alert message for the user. The error message is split on two lines to make it easier to read, and after the user clicks OK, the browser will back up one screen, allowing the user to fix whatever caused the error.

Do you have comments on this tip? Let us know.

Dig Deeper on Web Development for Lotus Notes Domino



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...