When a channel policy check rejects (PolicyResult.accept==false) a request, the WebSphere® Multichannel Bank Transformation Toolkit Channel driver will throw the com.ibm.btt.channel.ChannelPolicyException exception. By default, the WebSphere Multichannel Bank Transformation Toolkit presentation handler returns the exception to the client end. But a more user friendly error message to client end might be more appropriate. In this case, a technical developer must extend the channel presentation handler to handle the exception.
com.ibm.btt.cs.html.AjaxHtmlPresentationHandleror
com.ibm.btt.cs.html.HtmlPresentationHandlerTo handle exceptions according to the requirements of specific applications, technical developers must extend either of the above presentation handlers and override the handleException method.
public void handleException(ChannelContext channelContext, Exception e)
To apply the new presentation handler, technical developers must configure this presentation handler in the btt.xml file for the channel.