java.net.ConnectException.fillInStackTrace()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中java.net.ConnectException.fillInStackTrace()方法的一些代码示例,展示了ConnectException.fillInStackTrace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConnectException.fillInStackTrace()方法的具体详情如下:
包路径:java.net.ConnectException
类名称:ConnectException
方法名:fillInStackTrace

ConnectException.fillInStackTrace介绍

暂无

代码示例

代码示例来源:origin: kaazing/gateway

@Override
public void operationComplete(CloseFuture future) {
  if (wsnConnectFuture.isDone()) {
    return;
  }
  HttpConnectSession httpSession = (HttpConnectSession) future.getSession();
  HttpStatus httpStatus = httpSession.getStatus();
  switch (httpStatus) {
    case INFO_SWITCHING_PROTOCOLS:
      doUpgrade(httpSession);
      break;
    default:
      Throwable exception = new ConnectException(String.format("Unexpected HTTP response %d - %s",
          httpStatus.code(), httpStatus.reason())).fillInStackTrace();
      if (logger.isDebugEnabled()) {
        logger.debug("WsnConnector: failing connection with exception " + exception);
      }
      wsnConnectFuture.setException(exception);
      break;
  }
}

代码示例来源:origin: OpenNMS/opennms

e.fillInStackTrace();
LOG.debug("poll: {}", reason, e);

相关文章