Handles the failure case by logging the error and reporting an internal error to the
listener.
975572
public void handleFailure (Exception error)
    {
        if (error instanceof InvocationException) {
            _listener.requestFailed(error.getMessage());
        } else {
            if (_args != null) {
                log.warning(getFailureMessage(), ArrayUtil.append(_args, error));
            } else {
                log.warning(getFailureMessage(), error);
            }
            _listener.requestFailed(InvocationCodes.INTERNAL_ERROR);
        }
    }
412458
protected void handleError(String errMsg) throws Exception {
    // log it
    LOGGER.log(Level.SEVERE, errMsg);
    // and throw an error if this is configured
    if (this.isThrowExceptionOnError()) {
      throw new Exception(errMsg);
    }
  }
507592
protected void handleException(Throwable t) {

        if (LOG.isErrorEnabled()) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_ERR_JSP_BEAN_0), t);
        }
        if (!(m_isSupressingExceptions || getRequestContext().getCurrentProject().isOnlineProject())) {
            if (LOG.isDebugEnabled()) {
                // no stack trace needed since it was already logged with the "error" log message above
                LOG.debug(
                    Messages.get().getBundle().key(Messages.LOG_DEBUG_INTERRUPTED_EXCEPTION_1, getClass().getName()));
            }
            String uri = null;
            Throwable u = getController().getThrowable();
            if (u != null) {
                uri = getController().getThrowableResourceUri();
            } else {
                uri = getRequestContext().getUri();
            }
            throw new CmsRuntimeException(
                Messages.get().container(Messages.ERR_RUNTIME_1, (uri != null) ? uri : getClass().getName()),
                t);
        }
    }
945937
public void error(String msg, Throwable e) {
        doLog(msg, LOG_ERROR, null, e);
    }
1061745
def handle_crashed_listener(listener, error, retry_count)
      backoff = listener.create_exponential_backoff
      interval = backoff.interval_at(retry_count).round(2)

      metadata = {
        listener_id: listener.id,
        retry_count: retry_count,
        waiting_time: interval
      }.merge(error_metadata(error))

      instrument('executor.retry_listener_error', metadata) do
        log_error("Listener crashed, waiting #{interval}s (#{error.message})", metadata)
        sleep interval
      end
    end
501183
@RestrictTo(LIBRARY)
	public void notifyFailedUseCase(AbstractException exception, UseCaseListener listener) {
		try {
			LOGGER.debug("Notifying " + getClass().getSimpleName() + " finish failed to listener " + listener.getClass().getSimpleName());
			listener.onFinishFailedUseCase(exception);
		} catch (Exception e) {
			AbstractException abstractException = wrapException(e);
			logHandledException(abstractException);
		}
	}
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;
                }
            });
        }
    }
1295855
protected void handleInternalException(
        Throwable internalException,
        CompilationUnitDeclaration unit,
        CompilationResult result) {

        if (result == null && unit != null) {
            result = unit.compilationResult; // current unit being processed ?
        }
        // Lookup environment may be in middle of connecting types
        if (result == null && this.lookupEnvironment.unitBeingCompleted != null) {
            result = this.lookupEnvironment.unitBeingCompleted.compilationResult;
        }
        if (result == null) {
            synchronized (this) {
                if (this.unitsToProcess != null && this.totalUnits > 0)
                    result = this.unitsToProcess[this.totalUnits - 1].compilationResult;
            }
        }
        // last unit in beginToCompile ?

        boolean needToPrint = true;
        if (result != null) {
            /* create and record a compilation problem */
            // only keep leading portion of the trace
            String[] pbArguments = new String[] {
                Messages.bind(Messages.compilation_internalError, Util.getExceptionSummary(internalException)),
            };

            result
                .record(
                    this.problemReporter
                        .createProblem(
                            result.getFileName(),
                            IProblem.Unclassified,
                            pbArguments,
                            pbArguments,
                            Error, // severity
                            0, // source start
                            0, // source end
                            0, // line number
                            0),// column number
                    unit, true);

            /* hand back the compilation result */
            if (!result.hasBeenAccepted) {
                this.requestor.acceptResult(result.tagAsAccepted());
                needToPrint = false;
            }
        }
        if (needToPrint) {
            /* dump a stack trace to the console */
            internalException.printStackTrace();
        }
    }
922622
public void log(Throwable error, Level level) {
    log(error, null, null, level);
  }
455586
public void log(Throwable exception) {
		if (exception instanceof CoreException) {
			getILog().log(new Status(IStatus.ERROR, PLUGIN_ID,
					exception.getMessage(),
					exception.getCause()));
		} else if (exception != null) {
			getILog().log(new Status(IStatus.ERROR, PLUGIN_ID,
					exception.getMessage(), exception));
		} else {
			getILog().log(new Status(IStatus.ERROR, PLUGIN_ID,
					"Internal Error", exception));   //$NON-NLS-1$
		}
	}
522792
private void serveError(Status status, ErrorMessage.FailureReason reason, RequestHandler requestHandler) throws IOException {
    this.serveError(status, reason.getMessage(), requestHandler);
  }
163468
public static void error(Log log, Throwable e) {
		error(log, e, e.getMessage());
	}
1067811
public function handleError()
    {
        if (!$this->shutdownHandlerActive) {
            return;
        }

        $error = error_get_last();

        if ($error['type'] === E_ERROR) {
            $message = sprintf('Error: "%s" in %s on %s', $error['message'], $error['file'], $error['line']);
            $this->task->markError();
            $this->task->addOutput($message);
            $this->logger->error($message);
        }

        // Ensure to release the lock.
        $this->releaseLock();
    }
525545
def handle_error(
        self, error, req, schema, error_status_code=None, error_headers=None
    ):
        
        logger.error(error)
        raise error
260275
protected void handleFatalError (Object causer, Error error)
    {
        if (_fatalThrottle.throttleOp()) {
            throw error;
        }
        log.warning("Fatal error caused by '" + causer + "': " + error, error);
    }
1060627
protected void handleError(Error error) throws Exception {
    String errMsg="error: "+error.getCode()+" info: "+error.getInfo();
    handleError(errMsg);
  }
276464
protected void handleAdapterInvocationError(Throwable errorCause)
        throws ActivityException {
        logger.severeException(getAdapterInvocationErrorMessage(), errorCause);
        boolean isErrorRetryable;
        int errorCode;
        if (errorCause instanceof AdapterException) {
            AdapterException adEx = (AdapterException) errorCause;
            isErrorRetryable = adEx.isRetryable();
            if (adEx.getCode() != 0) {
                errorCode = adEx.getCode();
            }
            else {
                errorCode = ServiceException.INTERNAL_ERROR;
            }
        }
        else if (errorCause instanceof ConnectionException) {
            errorCode = ((ConnectionException)errorCause).getCode();
            // if process is invoked sync style, no need to retry due to connection failure
            Process procVO = getProcessDefinition();
            if (procVO.getProcessType().equals(ProcessVisibilityConstant.SERVICE)) {
                super.setReturnCode("ERROR:");
                return;
            }
            isErrorRetryable = true;
        }
        else {
            errorCode = ServiceException.INTERNAL_ERROR;
            isErrorRetryable = false;
        }

        if (isErrorRetryable) {
            super.setReturnCode(ActivityResultCodeConstant.RESULT_RETRY);
        }

        this.handleAdapterFailure(errorCode, errorCause);
    }