Aborts all the pending checkpoints due to en exception.
@param exception The exception.
481605
public void abortPendingCheckpoints(CheckpointException exception) {
		synchronized (lock) {
			for (PendingCheckpoint p : pendingCheckpoints.values()) {
				p.abort(exception.getCheckpointFailureReason());
			}

			pendingCheckpoints.clear();
		}
	}
400296
@Override
	public void onFatalError(Throwable exception) {
		LOG.error("Fatal error occurred while executing the TaskManager. Shutting it down...", exception);

		if (ExceptionUtils.isJvmFatalOrOutOfMemoryError(exception)) {
			terminateJVM();
		} else {
			closeAsync();

			FutureUtils.orTimeout(terminationFuture, FATAL_ERROR_SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS);

			terminationFuture.whenComplete(
				(Void ignored, Throwable throwable) -> {
					terminateJVM();
				});
		}
	}
1369120
public void abort(CheckpointFailureReason reason, Throwable cause) {
		try {
			CheckpointException exception = new CheckpointException(reason, cause);
			onCompletionPromise.completeExceptionally(exception);
			reportFailedCheckpoint(exception);
			assertAbortSubsumedForced(reason);
		} finally {
			dispose(true);
		}
	}
118929
public void releaseAndTryRemoveAll() throws Exception {
		Collection<String> children = getAllPaths();

		Exception exception = null;

		for (String child : children) {
			try {
				releaseAndTryRemove('/' + child);
			} catch (Exception e) {
				exception = ExceptionUtils.firstOrSuppressed(e, exception);
			}
		}

		if (exception != null) {
			throw new Exception("Could not properly release and try removing all state nodes.", exception);
		}
	}
1176705
public void destroy(Exception e) {
        if (this.appCallback != null) {
            this.appCallback.destroy(e);
            this.appCallback = null;
        }
    }
1270749
public final void exceptionOccured( JMSException exception )
    {
        try
        {
        	synchronized (exceptionListenerLock)
        	{
        		if (exceptionListener != null)
        			exceptionListener.onException(exception);
        	}
        }
        catch (Exception e)
        {
            log.error("Exception listener failed",e);
        }
    }
923951
public void setExceptions(java.util.Collection<RootCauseException> exceptions) {
        if (exceptions == null) {
            this.exceptions = null;
            return;
        }

        this.exceptions = new java.util.ArrayList<RootCauseException>(exceptions);
    }
406600
public void abort(Executor executor) throws SQLException {
    if (this.isClosed()) {
      return;
    }

    SQLPermission sqlPermission = new SQLPermission("callAbort");
    SecurityManager securityManager = System.getSecurityManager();
    if (securityManager != null) {
      securityManager.checkPermission(sqlPermission);
    }
    if (executor == null) {
      throw ExceptionMapper.getSqlException("Cannot abort the connection: null executor passed");
    }

    executor.execute(protocol::abort);
  }
237312
public static void finishIfApplicableAndLogException(Object toFinish) {
    try {
      finishIfApplicable(ImmutableList.of(toFinish));
    } catch (Exception e) {
      log.info("Exception while finishing {}: {}", toFinish, e);
    }
  }
587744
@Override
    protected void doStop() throws Exception
    {
        log.info("stopping...");
        if (_client != null)
        {
            _client.shutdown();
            _client = null;
        }
        super.doStop();
        log.info("stopped.");
    }
276235
public void releaseAll() throws Exception {
		Collection<String> children = getAllPaths();

		Exception exception = null;

		for (String child: children) {
			try {
				release(child);
			} catch (Exception e) {
				exception = ExceptionUtils.firstOrSuppressed(e, exception);
			}
		}

		if (exception != null) {
			throw new Exception("Could not properly release all state nodes.", exception);
		}
	}
78925
public void catchException(final Label start, final Label end,
            final Type exception) {
        if (exception == null) {
            mv.visitTryCatchBlock(start, end, mark(), null);
        } else {
            mv.visitTryCatchBlock(start, end, mark(),
                    exception.getInternalName());
        }
    }
1340459
private AbortProcessingException abortWithError(String msg, Element e) {
    reportError(e, msg);
    return new AbortProcessingException();
  }
1355781
public synchronized void stop() throws Exception {
		if (this.serverChannel != null) {
			this.serverChannel.close().awaitUninterruptibly();
			this.serverChannel = null;
		}
		if (bootstrap != null) {
			if (bootstrap.group() != null) {
				bootstrap.group().shutdownGracefully();
			}
			bootstrap = null;
		}
	}
1304575
public void abort(final Executor exec) throws SQLException {
        if (exec == null) {
            throw new SQLException("Missing executor");
        } // end of if

        if (this.closed) {
            return;
        } // end of if

        this.closed = true;
    }
558896
public void onFailure(JoynrException newException) {
        exception = newException;
        status = new RequestStatus(RequestStatusCode.ERROR);
        try {
            statusLock.lock();
            statusLockChangedCondition.signalAll();
        } finally {
            statusLock.unlock();
        }
    }
1121081
public final void setUncheckedLocalException(Throwable ex) throws EJBException {
        ExceptionMappingStrategy exceptionStrategy = getExceptionMappingStrategy();
        Throwable mappedException = exceptionStrategy.setUncheckedException(this, ex);
        if (mappedException != null) {
            if (mappedException instanceof EJBException) {
                throw (EJBException) mappedException;
            } else if (mappedException instanceof RuntimeException) {
                throw (RuntimeException) mappedException;
            } else if (mappedException instanceof Error) {
                throw (Error) mappedException;
            } else {
                // Unless there is a defect in mapping strategy, this should
                // never happen.  But if it does, we are going to
                // wrap what is returned with a EJBException. This is added
                // measure to ensure we do not break applications that
                // existed prior to EJB 3.
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "unexpected Throwable returned by exception mapping strategy", new Object[] { mappedException, exceptionStrategy });
                }
                throw ExceptionUtil.EJBException(mappedException);
            }
        }
    }