Sets the exception for this response and notifies any waiting threads.
Any calls to get() will have the exception thrown when an Exception is
set.

@param error
the exception for this response.
552410
void setError(Exception error) {
		if (this.error != null) {
			throw new IllegalStateException(
					"Cannot reassign the error value of a response.");
		}
		this.error = error;
		this.ready = true;
		synchronized (this) {
			this.notifyAll();
		}
	}
333266
@Override
    public void setError(CharSequence error, Drawable icon) {
        super.setError(error, icon);
        lastErrorIcon = icon;

        // if the error is not null, and we are in JB, force
        // the error to show
        if (error != null /* !isFocused() && */) {
            showErrorIconHax(icon);
        }
    }
339389
def set_exception(self, exception):
        '''  '''
        logger.error("%s : %s" % (exception.__class__.__name__, str(exception)))
        self._set_status(enumAsperaControllerStatus.FAILED, exception)
923951
public void setExceptions(java.util.Collection<RootCauseException> exceptions) {
        if (exceptions == null) {
            this.exceptions = null;
            return;
        }

        this.exceptions = new java.util.ArrayList<RootCauseException>(exceptions);
    }
1264284
public void addException(Exception exception) {
        LOGGER.log(Level.FINE, "Adding exception", exception);
        exceptionsToPublish.add(exception);
    }
1259220
def set_exception(self, exception):
        """"""
        self.set_exc_info(
            (exception.__class__,
             exception,
             getattr(exception, '__traceback__', None)))
374321
public void setException(Throwable exception) {
    this.exception = exception;

    if (handlers != null) {
      for (IsSimplePromiseResponseHandler<T> h : handlers) {
        h.onResponse(this);
      }
    }
  }
1003889
public Predicate<Exception> raise(Class<? extends Exception> exception) {
    return create(error -> error != null && exception.isAssignableFrom(error.getClass()));
  }
10780
public void notifyFailure(final Callback<?> callback, final Throwable error) {
    invokeLater(new Runnable() {
      public void run() {
        callback.onFailure(error);
      }
    });
  }
400557
protected function setResponseError($error, int $statusCode = 500) : void
    {
        if ($error instanceof \Exception) {
            $error = $error->getMessage();
        }

        $this->response['message'] = (string)$error;
        $this->response['status'] = $statusCode;
    }
28436
void handleException(Throwable t) {
    if (failure == null) {
      failure = t;

      for (ContextualFuture<?> responseFuture : responseFutures.values()) {
        responseFuture.context.executor().execute(() -> responseFuture.completeExceptionally(t));
      }
      responseFutures.clear();

      for (Listener<Throwable> listener : exceptionListeners) {
        listener.accept(t);
      }
    }
  }
998094
public void sendException(Throwable throwable) {
        EventBuilder eventBuilder = new EventBuilder().withMessage(throwable.getMessage())
            .withLevel(Event.Level.ERROR)
            .withSentryInterface(new ExceptionInterface(throwable));
        sendEvent(eventBuilder);
    }
698918
public void error(Object message, Throwable exception) {
    log(Level.ERROR, message, exception);
  }
638427
public ServiceException setException(Throwable innerException) {
        ByteArrayOutputStream messageOutputStream = new ByteArrayOutputStream();
        innerException.printStackTrace(new PrintStream(messageOutputStream));

        String exceptionMessage = messageOutputStream.toString();

        this.fault.setException(exceptionMessage);

        return this;
    }
1108767
def set_exception(self, exception):
        '''
        
        '''
        if hasattr(self, '_result'):
            raise ValueError('Cannot set the result twice')
        self._result = None
        self._exception = exception
        self._scheduler.emergesend(FutureEvent(self, exception = exception))
629801
public void         takeException(Exception exception) throws Exception
    {
        boolean     rethrow = true;
        if ( isRetryException(exception) )
        {
            if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
            {
                log.debug("Retry-able exception received", exception);
            }

            if ( retryPolicy.allowRetry(retryCount++, System.currentTimeMillis() - startTimeMs, sleeper) )
            {
                new EventTrace("retries-allowed", tracer.get()).commit();
                if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
                {
                    log.debug("Retrying operation");
                }
                rethrow = false;
            }
            else
            {
                new EventTrace("retries-disallowed", tracer.get()).commit();
                if ( !Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
                {
                    log.debug("Retry policy not allowing retry");
                }
            }
        }

        if ( rethrow )
        {
            throw exception;
        }
    }
754165
public void error(final String message, final Exception exception) {
        messages.add(new LogMessage(message + " " + exception.getMessage(), LogMessage.Type.ERROR));
        log.error(message, exception);
    }