Adding an exception to this result.

@param exec the exception stored to this result
190726
public void addException(final AbstractPerfidixMethodException exec) {
        this.getExceptions().add(exec);
        for (final AbstractOutput output : outputs) {
            output.listenToException(exec);
        }
    }
1220783
private static void _invokeCustomExceptionCallback (@Nonnull final Throwable ex)
  {
    s_aExceptionCallbacks.forEach (x -> x.onException (ex));
  }
843221
public void fireStatementErrorOccured(Statement st, SQLException ex) {
    if (st instanceof PreparedStatement) {
      StatementEvent event = new StatementEvent(this, (PreparedStatement) st, ex);
      for (StatementEventListener listener : statementEventListeners) {
        listener.statementErrorOccurred(event);
      }
    }
  }
506483
def throw(self, command):
        
        exception_message = '[Process {}{}]:\n{}'.format(command.pid, ' - {}'
                                                        .format(command.process_title) if command.process_title else '',
                                                        command.stacktrace)

        message = self.get_format()
        message = message.replace('{L}', 'EXCEPTION')
        message = '{}\t{}\n'.format(message, exception_message)

        self.append_exception(message)

        # Redraw
        self.changes_made = True
        self.redraw()

        self.log.critical('\t{}'.format(exception_message))
374619
def _handle_run_exception(self, exc):
        
        if len(self._current_tups) == 1:
            tup = self._current_tups[0]
            self.raise_exception(exc, tup)
            if self.auto_fail:
                self.fail(tup)
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);
            }
        }
    }
224631
public void addError(SyntaxException error, SourceUnit source) throws CompilationFailedException {
        addError(Message.create(error, source), error.isFatal());
    }
14149
private void processCommand(List<String> command) throws Exception {
        processBuilder.command(command);
        Process p = processBuilder.start();
        checkReturnCode(p, processBuilder.command().toString(), 0);
    }
1179433
private void execute(String command) throws XAException {
    try {
      connection.createStatement().execute(command);
    } catch (SQLException sqle) {
      throw mapXaException(sqle);
    }
  }
395853
public void exception(Throwable e) {
    final String msg = e.getMessage();
    log(Level.SEVERE, msg != null ? msg : "An exception occurred.", e);
  }
1214877
@Nonnull
  public static <T> JPAExecutionResult <T> createFailure (@Nullable final Exception ex)
  {
    return new JPAExecutionResult <> (ESuccess.FAILURE, null, ex);
  }
262876
public void handleException(TaskCommand<String,String> taskCommand, Exception exception){
		try {
			exception(taskCommand, exception);
		}
		catch (Exception e){
			logger.warn("Handle Task Exception failed:",e);
		}
	}
222954
def exception(self, event=None, *args, **kw):
        
        if not self._logger.isEnabledFor(logging.ERROR):
            return

        kw = self._add_base_info(kw)
        kw['level'] = "exception"
        kw.setdefault('exc_info', True)
        return self.error(event, *args, **kw)
1264284
public void addException(Exception exception) {
        LOGGER.log(Level.FINE, "Adding exception", exception);
        exceptionsToPublish.add(exception);
    }
364580
public function exceptionHandler(Exception $exc)
    {
        $error = array(
            'code' => $exc->getCode(),
            'file' => $exc->getFile(),
            'line' => $exc->getLine(),
            'message' => $exc->getMessage(),
            'backtrace' => $this->log_backtrace ? gplcart_backtrace() : array()
        );

        $this->log('php_exception', $error, 'danger', false);
        echo $this->getFormattedError($error, 'Exception');
    }
1182615
public void displayError(DBException ex)
    {
        int iWarningLevel = DBConstants.WARNING_MESSAGE;
        String strMessage = DBConstants.BLANK;
        if (ex instanceof DatabaseException)
        {
            iWarningLevel = ((DatabaseException)ex).getWarningLevel();
            strMessage = ((DatabaseException)ex).getMessage(this.getTask());
        }
        else
            strMessage = ex.getMessage();
        this.displayError(strMessage, iWarningLevel);
    }
981667
public void setNextException(SQLException ex) {

        SQLException current = this;
        for(;;) {
            SQLException next=current.next;
            if (next != null) {
                current = next;
                continue;
            }

            if (nextUpdater.compareAndSet(current,null,ex)) {
                return;
            }
            current=current.next;
        }
    }