If the ErrorCode is D9_TEMPLATE_NOT_REGISTERED then the original message is discarded. Important information like the template id is lost. This makes finding the original problem much harder. I don't understand why the original message is being replaced, but perhaps the original message could be appended to the new one?
public void error(ErrorCode code, String message) {
if (code.equals(FastConstants.D9_TEMPLATE_NOT_REGISTERED))
{
code = SessionConstants.TEMPLATE_NOT_SUPPORTED;
message = "Template Not Supported";
}
protocol.onError(this, code, message);
errorHandler.error(code, message);
}
|