How to capture a protocol error and display a custom message in Insight for Excel

Question

Is there a way to prevent Insight for Excel from passing a run-time protocol error to the Excel UI?

For example, I would like to catch an Oracle error message from an "SQL Select" component and display a message that makes more sense to the end-user than the native Oracle error does.

Answer

If you always want to show the same generic error message, the simplest way is to modify the error handling of the "SQL Select" component which you can do in the Runtime tab of the component. Here you can define a custom error message.

If you don't want to throw the error to the client, you can also select to send the data to the Fail Port when an error occurs. The error message will then be in the ErrorText data property so you can for example connect a Custom Manipulator (PilotScript) to the Fail Port, analyze the error and throw a custom error instead using the Error command in the Pilot Script.

Attached is a very simple example protocol (CustomErrorMessage.ppxml) that illustrates this.


​​​​​​​