LOGGER.warn("receive exception sid=" + sid + " " + ex.toString());
SCMPMessage fault = null;
SCMPVersion scmpVersion = reqMessage.getSCMPVersion();
if (ex instanceof IdleTimeoutException) {
// operation timeout handling - SCMP Version request
fault = new SCMPMessageFault(scmpVersion, SCMPError.OPERATION_TIMEOUT, "Operation timeout expired on SC sid=" + sid);
} else if (ex instanceof IOException) {
fault = new SCMPMessageFault(scmpVersion, SCMPError.CONNECTION_EXCEPTION, "broken connection on SC sid=" + sid);
} else if (ex instanceof InvalidMaskLengthException) {
fault = new SCMPMessageFault(scmpVersion, SCMPError.HV_WRONG_MASK, ex.getMessage() + " sid=" + sid);
} else {
fault = new SCMPMessageFault(scmpVersion, SCMPError.SC_ERROR, "executing " + this.msgType + " failed sid=" + sid);
}
fault.setSessionId(this.request.getMessage().getSessionId());
String serviceName = reqMessage.getServiceName();
// forward server reply to client
fault.setIsReply(true);