List of usage examples for io.netty.util.internal.logging InternalLogger warn
void warn(String msg, Throwable t);
From source file:kr.pe.codda.server.task.ToLetterCarrier.java
License:Apache License
public static void putInputErrorMessageToOutputMessageQueue(SelfExn.ErrorType errorType, String errorReason, int mailboxID, int mailID, String messageID, AcceptedConnection fromAcceptedConnection, MessageProtocolIF messageProtocol) throws InterruptedException { if (null == errorType) { throw new IllegalArgumentException("the parameter errorType is null"); }//from w ww .ja v a 2s .c om if (null == errorReason) { throw new IllegalArgumentException("the parameter errorReason is null"); } if (null == fromAcceptedConnection) { throw new IllegalArgumentException("the parameter fromSocketResource is null"); } if (null == messageProtocol) { throw new IllegalArgumentException("the parameter messageProtocol is null"); } SelfExnRes selfExnRes = buildSelfExn(mailboxID, mailID, messageID, errorType, errorReason); ArrayDeque<WrapBuffer> wrapBufferListOfSelfExn = null; try { wrapBufferListOfSelfExn = messageProtocol.M2S(selfExnRes, CommonStaticFinalVars.SELFEXN_ENCODER); } catch (Exception e) { InternalLogger log = InternalLoggerFactory.getInstance(ToLetterCarrier.class); String errorMessage = new StringBuilder() .append("fail to build a output stream of the output message SelfExnRes[") .append(selfExnRes.toString()).append("] to send to from-client[") .append(fromAcceptedConnection.toSimpleInfomation()) .append("] because of unknown error, errmsg=").append(e.getMessage()).toString(); log.warn(errorMessage, e); return; } fromAcceptedConnection.addOutputMessage(selfExnRes, wrapBufferListOfSelfExn); }