Specifies that no exception should be thrown, failing with a
{@link UnallowedExceptionThrownError} otherwise.
973990
public void noExceptionThrown() {
    Throwable thrown = getSpecificationContext().getThrownException();
    if (thrown == null) return;
    throw new UnallowedExceptionThrownError(null, thrown);
  }
328520
public static ExceptionCallback ignore() {
        return new ExceptionCallback() {
            @Override
            public void exception(FailedEventInvocation invocation) {
                FailedEventInvocation.log(LOG, invocation);
            }
        };
    }
1162746
@Override
    protected void throwExceptionForError(final int errorCode) {
        try {
            m_connection.throwException(errorCode);
        } catch (final IOException e) {
            throw new RuntimeException(e);
        }
    }
709420
@Override
  @SuppressWarnings("checkstyle:illegalcatch")
  public void onNext(final T value) {
    beforeOnNext();
    try {
      executor.submit(new Runnable() {

        @Override
        public void run() {
          try {
            handler.onNext(value);
          } catch (final Throwable t) {
            if (errorHandler != null) {
              errorHandler.onNext(t);
            } else {
              LOG.log(Level.SEVERE, name + " Exception from event handler", t);
              throw t;
            }
          } finally {
            afterOnNext();
          }
        }

      });
    } catch (final Exception e) {
      LOG.log(Level.SEVERE, "Encountered error when submitting to executor in ThreadPoolStage.");
      afterOnNext();
      throw e;
    }

  }
1158987
protected void enableRemoteExceptionHandler() {

        if (GWT.isScript()) {
            // In hosted mode, uncaught exceptions are easier to debug
            return;
        }

        GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {

            /**
             * @see com.google.gwt.core.client.GWT.UncaughtExceptionHandler#onUncaughtException(java.lang.Throwable)
             */
            public void onUncaughtException(Throwable t) {

                if (t instanceof UmbrellaException) {
                    t = ((UmbrellaException)t).getCauses().iterator().next();
                }
                String message = CmsClientStringUtil.getMessage(t);
                CmsNotification.get().send(CmsNotification.Type.WARNING, message);
                CmsLog.log(message + "\n" + CmsClientStringUtil.getStackTrace(t, "\n"));
            }
        });
    }
1239646
protected final void notifyError(@NonNull final Throwable e) {
        //noinspection ThrowableResultOfMethodCallIgnored
        checkNotNull(e, "e");
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                mErrorObservable.notifyError(e);
            }
        });
    }
526816
public static Throwable unwrap(@Nullable Throwable t) {
		if (t instanceof UncheckedException || t instanceof java.util.concurrent.ExecutionException
				|| t instanceof java.lang.reflect.InvocationTargetException
				|| t instanceof UndeclaredThrowableException) {
			return t.getCause();
		}

		return t;
	}
434066
def handle_unhandled_exception(exc_type, exc_value, exc_traceback):
    """"""
    if issubclass(exc_type, KeyboardInterrupt):
        # call the default excepthook saved at __excepthook__
        sys.__excepthook__(exc_type, exc_value, exc_traceback)
        return
    logger = logging.getLogger(__name__) # type: ignore
    logger.critical("Unhandled exception", exc_info=(exc_type, exc_value, exc_traceback))
78759
private void handleException(final Throwable e)
    {
        if ( errorListeners.size() == 0 )
        {
            LOG.error("", e);
        }
        else
        {
            errorListeners.forEach(new Function<UnhandledErrorListener, Void>()
            {
                @Override
                public Void apply(UnhandledErrorListener listener)
                {
                    try
                    {
                        listener.unhandledError("", e);
                    }
                    catch ( Exception e )
                    {
                        ThreadUtils.checkInterrupted(e);
                        LOG.error("Exception handling exception", e);
                    }
                    return null;
                }
            });
        }
    }
630418
public static void rethrowException(Throwable t) throws Exception {
		if (t instanceof Error) {
			throw (Error) t;
		}
		else if (t instanceof Exception) {
			throw (Exception) t;
		}
		else {
			throw new Exception(t.getMessage(), t);
		}
	}
1246093
public boolean hasException() {
        return Optional.ofNullable(commandResult)
                        .map(result -> StringUtils.hasText(result.getException()))
                        .orElse(false);
    }
1369284
@Override
  public void onException(Throwable failureCause) {
    Preconditions.checkNotNull(failureCause, "failureCause");
    Status status = Status.UNAVAILABLE.withCause(failureCause);
    startGoAway(0, ErrorCode.INTERNAL_ERROR, status);
  }
796218
public static boolean shouldUnwrap(Class<? extends Exception> c) {
        return c.equals(CompletionException.class) || c.equals(ExecutionException.class);
    }
978797
static Throwable unwrapException(Throwable wrapped, StringBuilder outAction) {
        Throwable unwrapped = wrapped;

        while ((unwrapped instanceof ExecutionException) || (unwrapped instanceof CompletionException)
                || (unwrapped instanceof ExceptionWithAction)) {
            if ((unwrapped instanceof ExceptionWithAction) && (outAction != null)) {
                // Save the action string from an ExceptionWithAction, if desired.
                outAction.append(((ExceptionWithAction) unwrapped).getAction());
            }

            if ((unwrapped.getCause() != null) && (unwrapped.getCause() instanceof Exception)) {
                unwrapped = unwrapped.getCause();
            } else {
                break;
            }
        }

        return unwrapped;
    }
1221334
@SafeVarargs
    public final Builder abortOn(Class<? extends Exception>... exceptions) {
      for (Class<? extends Exception> exception : exceptions) {
        nonRetriableExceptions.add(checkNotNull(exception));
      }
      return this;
    }
1057863
public void fail(Throwable t) {
    if (!failed) {
      if (doneHandler != null) {
        doneHandler.handle(new DefaultFutureResult<T>(t));
      } else {
        cause = t;
      }
      failed = true;
    }
  }
1143985
protected function exceptionIfNotSelect()
    {
        if (!$this->isSelect()) {
            throw new RuntimeException(
                Message::get(Message::DB_RESULT_NOT_SELECT),
                Message::DB_RESULT_NOT_SELECT
            );
        }
    }