Passes an exception to the given error handling callback and optionally outputs some debug info.<p>

@param e the exception
@param callback  the error handling callback
765046
public void handleError(Throwable e, I_CmsErrorCallback callback) {

        String errorCode = CmsUgcConstants.ErrorCode.errMisc.toString();
        String message;
        if (e instanceof CmsUgcException) {
            CmsUgcException formException = (CmsUgcException)e;
            errorCode = formException.getErrorCode().toString();
            message = formException.getUserMessage();
        } else {
            message = e.getMessage();
        }
        if (callback != null) {
            callback.call(errorCode, message, JavaScriptObject.createObject());
        }
    }
1220783
private static void _invokeCustomExceptionCallback (@Nonnull final Throwable ex)
  {
    s_aExceptionCallbacks.forEach (x -> x.onException (ex));
  }
887627
@Override
    public void error(String msg, Throwable e) {
        log.logIfEnabled(FQCN, Level.ERROR, null, msg, e);
    }
601090
public void debug (String msg, Throwable e) {
    log(Level.DEBUG, msg, e);
  }
1263784
public static void exception(TraceComponent tc, Exception e) {
    if(isTracing()) SibTr.exception(tc, e);

  }
21036
public void error( Element e, String msg, Object... args ) {
        messager.printMessage( Diagnostic.Kind.ERROR, String.format( msg, args ), e );
    }
715583
public static void printError(Object errorMessage)
	{

		if (errorMessage instanceof Throwable)
		{

			Throwable e = (Throwable) errorMessage;

			getLog(Debugger.class).error(stackTrace(e));

		}
		else
			getLog(Debugger.class).error(errorMessage);

	}
179611
public void processException(Class sourceClass,
                                 String methodName,
                                 Throwable throwable,
                                 String probe) {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(cclass,
                        "processException",
                        new Object[] { sourceClass,
                                      methodName,
                                      throwable,
                                      probe });
        print(null,
              sourceClass,
              methodName,
              throwable,
              probe,
              null,
              null);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(cclass,
                       "processException");

    }
951010
private void processCallback(final Callback callback) {
        try {
            JsonNode result = handleCallback(callback);
            this.getClient().completeCallback(callback, null, result);
        } catch (JsiiException e) {
            this.getClient().completeCallback(callback, e.getMessage(), null);
        }
    }
1318231
protected final void __handleTemplateExecutionException(Exception e) {
        try {
            if (!RythmEvents.ON_RENDER_EXCEPTION.trigger(__engine(), F.T2(this, e))) {
                throw e;
            }
        } catch (RuntimeException e0) {
            throw e0;
        } catch (Exception e1) {
            throw new RuntimeException(e1);
        }
    }
314723
static void exitWithError(Boolean isDebug, Exception e) {
        System.err.println("Error executing function (Use -x for more information): " + e.getMessage());
        if (isDebug) {
            System.err.println();
            System.err.println("Error Detail");
            System.err.println("------------");
            e.printStackTrace(System.err);
        }
        System.exit(1);
    }
75767
public static void queueException(final Throwable e) {
		if (e != null) {
			try {
				LogAppender<LogEvent> appender = LogManager.getAppender();
	
				if (appender != null) {
					appender.append(LogEvent.newBuilder().level("ERROR").message(e.getMessage()).exception(e).build());
				}
			} catch (Throwable t) {
				LOGGER.info("Unable to queue exception to Stackify Log API service: {}", e, t);
			}
		}
	}
589877
void printError(String type, SAXParseException e) {
        PrintWriter logger = new PrintWriter(System.out);
        logger.print(type);
        if (e.getLineNumber() >= 0) {
            logger.print(" at line " + e.getLineNumber());
            if (e.getColumnNumber() >= 0) {
                logger.print(", column " + e.getColumnNumber());
            }
            if (e.getSystemId() != null) {
                logger.print(" of " + e.getSystemId());
            }
        } else {
            if (e.getSystemId() != null) {
                logger.print(" in " + e.getSystemId());
            }
        }
        logger.println(":");
        logger.println("  " + e.getMessage());
        logger.flush();
    }
1157826
static synchronized void connectionClosedOnError(EnhancedDebugger debugger, Exception e) {
        int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane);
        getInstance().tabbedPane.setToolTipTextAt(
                index,
                "XMPPConnection closed due to the exception: " + e.getMessage());
        getInstance().tabbedPane.setIconAt(
                index,
                connectionClosedOnErrorIcon);
    }
282059
private void setExceptionInfo(DistributedExceptionEnabled e) {
        if (e != null) {
            setClassName(e.getClass().getName());
        }
        currentException = e;
    }
767417
public void handleException(Throwable e) {
    while (e instanceof InvocationTargetException) {
      e = ((InvocationTargetException) e).getTargetException();
    }

    if (e instanceof SQLException) {
      handleSQLException((SQLException) e);
    } else if (e instanceof WrappedSqlException) {
      handleSQLException((SQLException) e.getCause());
    } else if (!initComplete && !getOpts().getVerbose()) {
      // all init errors must be verbose
      if (e.getMessage() == null) {
        error(e.getClass().getName());
      } else {
        error(e.getMessage());
      }
    } else {
      e.printStackTrace(getErrorStream());
    }
  }
671555
public void setExceptionGen(@Nullable TypeMerger m, CodeExceptionGen exceptionGen) {
        if (this.exceptionGen != null) {
            AnalysisContext.logError("Multiple exception handlers");
        }

        this.exceptionGen = exceptionGen;
    }