Checks if the exception is a client abort exception
@param e
@return true if the exception is a client abort exception
183525
public static boolean isClientAbortException(IOException e) {
		
		String exceptionClassName = e.getClass().getName();
		return exceptionClassName.endsWith(".EofException")
				|| exceptionClassName.endsWith(".ClientAbortException");
	}
121053
public boolean hasException(Class<? extends Throwable> type) {
        for (Throwable exception : exceptions) {
            if (type.isInstance(exception)) {
                return true;
            }
        }
        
        return false;
    }
257873
private static void printException(Exception e) {

        if (e instanceof InstallationCancelledException) {
            System.out.println("Installation cancelled.");
            return;
        }

        boolean recognized = false;
        String msg = "ERROR: ";
        if (e instanceof InstallationFailedException) {
            msg += "Installation failed: " + e.getMessage();
            recognized = true;
        } else if (e instanceof OptionValidationException) {
            OptionValidationException ove = (OptionValidationException) e;
            msg +=
                    "Bad value for '" + ove.getOptionId() + "': "
                            + e.getMessage();
            recognized = true;
        }

        if (recognized) {
            System.err.println(msg);
            if (e.getCause() != null) {
                System.err.println("Caused by: ");
                e.getCause().printStackTrace(System.err);
            }
        } else {
            System.err.println(msg + "Unexpected error; installation aborted.");
            e.printStackTrace();
        }
    }
38334
public static String exception2String(Exception e) {
        StringWriter sw = new StringWriter();
        e.printStackTrace(new PrintWriter(sw));
        return sw.toString().trim();
    }
195229
private static boolean maybeReadTimeOut(Throwable e) {
        do {
            if (IOException.class.isInstance(e)) {
            	String message = e.getMessage().toLowerCase();
            	Matcher matcher = READ_TIME_OUT_PATTERN.matcher(message);
            	if(matcher.find()) {
            		return true;
            	}
            }
            e = e.getCause();
        } while (e != null);
        return false;
    }
240306
public boolean stop()
    throws Exception
  {
    /*
    if (_clusterServerPublisher != null) {
      _clusterServerPublisher.onServerStop(_selfServer.getServerBartender());
    }
    */
    
    try {
      if (_portPublic != null) {
        _portPublic.close();
      }
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
    }
    
    try {
      if (_portBartender != null) {
        _portBartender.close();
      }
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
    }
    
    return true;
  }
871284
protected Boolean getApplicationExceptionRollback(Throwable t) {
        Boolean rollback;
        if (ivIgnoreApplicationExceptions) {
            rollback = null;
        } else {
            ComponentMetaData cmd = getComponentMetaData();
            EJBModuleMetaDataImpl mmd = (EJBModuleMetaDataImpl) cmd.getModuleMetaData();
            rollback = mmd.getApplicationExceptionRollback(t);
        }
        return rollback;
    }
316644
@Override
	public void setException(@NotNull Throwable e) {
		assert !isComplete();
		exception = e;
		completeExceptionally(e);
	}
1209754
public boolean abortMC() {
        boolean trace = TraceComponent.isAnyTracingEnabled();
        if (!(mc instanceof WSManagedConnection)) {
            if (trace && tc.isDebugEnabled())
                Tr.debug(tc, "abortMC", "Skipping MC abort because MC is not an instance of WSManagedConnection");
            return false;
        }

        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, "abortMC");

        WSManagedConnection wsmc = (WSManagedConnection) mc;
        try {
            do_not_reuse_mcw = true;
            wsmc.abort(pm.connectorSvc.execSvcRef.getServiceWithException());
            aborted = true;
            releaseToPoolManager(); // Get the connection out of the pool
        } catch (SQLFeatureNotSupportedException e) {
            if (trace && tc.isDebugEnabled())
                Tr.debug(tc, "JDBC feature or driver does not support aborting connections.");
        } catch (Exception e) {
            com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.MCWrapper.abortMC", "3765", this);
            if (trace && tc.isDebugEnabled())
                Tr.debug(this, tc, "Caught exception aborting connection or releasing aborted connection to the pool manager.");
        }

        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, "abortMC", aborted);
        return aborted;
    }
14527
public static boolean isRetryableServiceException(SdkBaseException exception) {
        return isAse(exception) && RETRYABLE_STATUS_CODES.contains(toAse(exception).getStatusCode());
    }
897429
def _is_connreset(self, exc: BaseException) -> bool:
        
        return (
            isinstance(exc, (socket.error, IOError))
            and errno_from_exception(exc) in _ERRNO_CONNRESET
        )
1005438
public static String formatException(final Exception e) {
    final StringBuilder sb = new StringBuilder();
    Throwable t = e;
    while (t != null) {
      sb.append(t.getMessage()).append("\n");
      t = t.getCause();
    }
    return sb.toString();
  }
571301
public static String exception2StringShort(Exception e) {
        StringBuffer st = new StringBuffer();
        Throwable e2 = e;

        while (e2 != null) {
            String exClass = e2.getClass().getName();
            String msg = e2.getMessage();

            if (msg != null) {
                st.setLength(0);
                st.append(exClass);
                st.append(": ");
                st.append(msg);
            }
            e2 = e2.getCause();
        }

        return st.toString().trim();
    }
220147
private boolean isInterruptTransitively(Throwable e) {
        do {
            if (e instanceof InterruptedException) {
                return true;
            }
            e = e.getCause();
        } while (e != null);
        return false;
    }
313573
protected SofaRpcException convertToRpcException(Exception e) {
        SofaRpcException exception;
        if (e instanceof SofaRpcException) {
            exception = (SofaRpcException) e;
        }
        // 超时
        else if (e instanceof InvokeTimeoutException) {
            exception = new SofaTimeOutException(e);
        }
        // 服务器忙
        else if (e instanceof InvokeServerBusyException) {
            exception = new SofaRpcException(RpcErrorType.SERVER_BUSY, e);
        }
        // 序列化
        else if (e instanceof SerializationException) {
            boolean isServer = ((SerializationException) e).isServerSide();
            exception = isServer ? new SofaRpcException(RpcErrorType.SERVER_SERIALIZE, e)
                : new SofaRpcException(RpcErrorType.CLIENT_SERIALIZE, e);
        }
        // 反序列化
        else if (e instanceof DeserializationException) {
            boolean isServer = ((DeserializationException) e).isServerSide();
            exception = isServer ? new SofaRpcException(RpcErrorType.SERVER_DESERIALIZE, e)
                : new SofaRpcException(RpcErrorType.CLIENT_DESERIALIZE, e);
        }
        // 长连接断连
        else if (e instanceof ConnectionClosedException) {
            exception = new SofaRpcException(RpcErrorType.CLIENT_NETWORK, e);
        }
        // 客户端发送失败
        else if (e instanceof InvokeSendFailedException) {
            exception = new SofaRpcException(RpcErrorType.CLIENT_NETWORK, e);
        }
        // 服务端未知异常
        else if (e instanceof InvokeServerException) {
            exception = new SofaRpcException(RpcErrorType.SERVER_UNDECLARED_ERROR, e.getCause());
        }
        // 客户端未知
        else {
            exception = new SofaRpcException(RpcErrorType.CLIENT_UNDECLARED_ERROR, e);
        }
        return exception;
    }
1270141
@Nonnull
    protected Throwable getResponseException(Throwable e) {
        // Unwrap execution exceptions.
        if (ExecutionException.class.isAssignableFrom(e.getClass())) {
            return getResponseException(e.getCause());
        }
        return e;
    }
1225623
public boolean isConnectionError(SQLException ex) {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(this, tc, "isConnectionError", ex);

        // Maintain a set in order to check for cycles
        Set<Throwable> chain = new HashSet<Throwable>();

        boolean stale = false;
        for (Throwable t = ex; t != null && !stale && chain.add(t); t = t.getCause()) {
            SQLException sqlX = t instanceof SQLException ? (SQLException) t : null;
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(this, tc, "checking " + t,
                         sqlX == null ? null : sqlX.getSQLState(),
                         sqlX == null ? null : sqlX.getErrorCode());
            if (sqlX != null)
                stale |= sqlX instanceof SQLRecoverableException ||
                         sqlX instanceof SQLNonTransientConnectionException ||
                         sqlX instanceof SQLTransientConnectionException && failoverOccurred(sqlX) ||
                         staleErrorCodes.contains(sqlX.getErrorCode()) ||
                         staleSQLStates.contains(sqlX.getSQLState());
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(this, tc, "isConnectionError", stale);

        return stale;
    }