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:
- SaveOptions computed when composed to "0". This will unable any user to create a new document based on this form.
- MessageString having the default value MessageString. This field will contain the generated error massage.
<Script> alert("[MSG_disp]"); history.go(-1); </Script> The [MSG_disp] is a computed for display field containing this formula:Make the whole part pass though HTML, and you're done.
@ReplaceSubstring(MessageString; "-"; ":n")
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.