The ClearQuest clients for the Web and Eclipse allow hooks to customize the summary and details of an error message using XML that is embedded in the error text itself. However, because older clients, the ClearQuest client for Windows, and user written scripts do not support custom error messages, this capability should be accessed by adding a new global hook to your schema. This hook will embed the summary and details in a normal error message if the client does not support custom error messages, but it will die with a custom error message if the client supports it.
The example DieWithCustomErrorMessage function provided below can be called from all places where a die statement can be used, and it will have the same effect as a die statement on the current operation. For example, calling the DieWithCustomErrorMessage function from an access control hook would indicate failure in exactly the same way a die statement would indicate failure, but with a custom error message.
To view the example DieWithCustomErrorMessage code, see technical note 1322606 at http://www.ibm.com/support/docview.wss?&rs=939&uid=swg21322606.