Report a database exception onto the log.
@param callInfo Call info.
@param e Database exception.
764893
void write(CallInfo callInfo, SQLException e) {
    Element rootNode = root(callInfo);
    Element exNode = createNode(rootNode, DATABASE_EXCEPTION_TAG);
    StringWriter sw = new StringWriter();
    sw.append('\n');
    e.printStackTrace(new PrintWriter(sw));
    exNode.appendChild(xmlDoc.createCDATASection(sw.toString()));
    flush(rootNode);
  }
1349472
@Override
    public void reportException(JMSException e) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "reportException", e);
        if (elRef.get() != null) {
            asyncExceptionTask.handleException(e);
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "No exception listener is currently set for this connection.");
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "reportException");
    }
68763
public static void e(Throwable e) {
		messager.printMessage(Diagnostic.Kind.ERROR, "exception thrown! " + e.getMessage());
	}
1151999
protected function reportException(Exception $e)
    {
        $handler = $this->app->make(ExceptionHandler::class);

        $handler->report($e);
    }
157035
protected function checkForDatabaseError($query, $callingFunctionName)
    {
        $dbCon = $this->getDbConnection();
        if (is_a($dbCon, 'PDO') && ('00000' !== $dbCon->errorCode())) {
            $errorInfo = $dbCon->errorInfo();
            throw new Exception('PDO error code: ' . $dbCon->errorCode() . ' in function ' . $callingFunctionName . ' -- ' . $errorInfo[2] . ' -- ' . $query);
        }
    }
1151695
public void info(String msg, Throwable e) {
        doLog(msg, LOG_INFO, null, e);
    }
440334
protected void report(CompilationFailedException e, boolean child) {
        println(e.toString());
        stacktrace(e, false);
    }
259486
void logQuery(CallInfo callInfo, DataSet data) {
    if (isEnabled(Option.LOG_QUERIES)) {
      log.write(callInfo, data);
    }
  }
82591
public void logException(Throwable e, String message) {
        logMessage(IStatus.ERROR, message, e);
    }
1220783
private static void _invokeCustomExceptionCallback (@Nonnull final Throwable ex)
  {
    s_aExceptionCallbacks.forEach (x -> x.onException (ex));
  }
768881
public static void showFatalError(String title, String header, Exception e) {
        showException(title, header, e);
        System.exit(0);
    }
351025
private void handleException(String key, Exception e) {
        if (e != null) {
            log.error(key, e.getLocalizedMessage());
            throw new Abort(e);
        } else {
            log.error(key);
            throw new Abort();
        }
    }
1339715
public void logClosedException(Exception e) {
        // Note: this may be a normal occurance so don't log error, just debug.
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Connection closed with exception: " + e.getMessage());
        }
    }
574459
public void onError( Exception e ) {
        e.printStackTrace();
        String localizedMessage = e.getLocalizedMessage();
        if (localizedMessage == null) {
            localizedMessage = e.getMessage();
        }
        if (localizedMessage == null || localizedMessage.trim().length() == 0) {
            localizedMessage = "An undefined error was thrown. Please send the below trace to your technical contact:\n";
            localizedMessage += ExceptionUtils.getStackTrace(e);
        }

        String _localizedMessage = localizedMessage;
        SwingUtilities.invokeLater(new Runnable(){
            public void run() {
                JOptionPane.showMessageDialog(parent, _localizedMessage, "ERROR", JOptionPane.ERROR_MESSAGE);
            }
        });
    }
381468
void fireConnectionFatalError(SQLException e) {
    ConnectionEvent evt = null;
    // Copy the listener list so the listener can remove itself during this
    // method call
    ConnectionEventListener[] local =
        listeners.toArray(new ConnectionEventListener[listeners.size()]);
    for (ConnectionEventListener listener : local) {
      if (evt == null) {
        evt = createConnectionEvent(e);
      }
      listener.connectionErrorOccurred(evt);
    }
  }
147677
protected void logException (final Object caller, final Throwable t, final Object[] parameters) {
		logException(t, "{}: Exception in '{}' for parameters: {}", new Object[] { getReplacement(), caller, getParametersAsString(parameters) });
	}
328827
protected void error(E error) {
    this.error = checkNotNull(error);
    this.completed = true;
    for (Callback<T, E> callback : toBeNotified) {
      callback.error(error);
    }
  }