code: public static void logIfUnexpected(Logger logger, Channel ch, String debugData, Throwable cause) {
  
          if (!logger.isWarnEnabled() || isExpected(cause)) {
              return;
          }
  
          logger.warn("{} Unexpected exception: {}", ch, debugData, cause);
      }
docs: Logs the specified exception if it is {@linkplain #isExpected(Throwable) unexpected}.