String representation of the exception.
511534
def exception(self):
        """"""
        buf = traceback.format_exception_only(self.exc_type, self.exc_value)
        rv = "".join(buf).strip()
        return to_unicode(rv, "utf-8", "replace")
679610
def exception_class(self, exception):
		""""""

		cls = type(exception)
		if cls.__module__ == 'exceptions':  # Built-in exception.
			return cls.__name__
		return "%s.%s" % (cls.__module__, cls.__name__)
1118281
public static function exceptionToString($e, $getTrace = true, $catcher = null): string
    {
        return PhpException::toString($e, $getTrace, $catcher);
    }
462801
private synchronized String printTargetError( Throwable t ) {
            StringBuilder msgs = new StringBuilder(t.toString());
            while ( null != (t = t.getCause()) )
                msgs.append("\n").append(t.toString());
            return msgs.toString();
    }
1333045
public String toProblemString()
	{
		StringBuilder sb = new StringBuilder();
		sb.append(message);

		sb.append(".");
		for (String d : details)
		{
			sb.append(" ");
			sb.append(d);
		}

		return sb.toString();
	}
63921
private String printError(Throwable t) {

        StringBuffer result = new StringBuffer(1024);
        result.append("/*\n");
        result.append(CmsStringUtil.escapeHtml(t.getMessage()));
        result.append("\n*/\n");
        result.append("function init() {\n");
        result.append("}\n");
        return result.toString();
    }
619768
def ExceptionHook(exctype, value, tb):
    '''
    

    '''

    for line in traceback.format_exception_only(exctype, value):
        log.error(line.replace('\n', ''))
    for line in traceback.format_tb(tb):
        log.error(line.replace('\n', ''))
    sys.__excepthook__(exctype, value, tb)
481061
private String getDetails(ExceptionDto error) {
		if (null == error) {
			return "";
		}
		StringBuilder content = new StringBuilder();
		content.append(error.getClassName());
		if (error.getExceptionCode() != 0) {
			content.append(" (");
			content.append(error.getExceptionCode());
			content.append(")");
		}
		processStackTrace(error.getStackTrace(), content);
		content.append(getDetails(error.getCause()));
		return content.toString();
	}
819124
public static String getExceptionCause(final Exception exception) {
		if (exception == null) {
			return "";
		}

		final StringBuilder cause = new StringBuilder();
		Throwable nestedException = (Throwable) exception;
		while (nestedException != null) {
			cause.append("Caused by: ").append(nestedException.toString()).append(" ");
			nestedException = getInnerException(nestedException);
		}

		return cause.toString();
	}
958096
def exception(self):
        ''''''
        code, _, message = self.data.partition(' ')
        return self.find(code)(message)
826001
private String formatException(Throwable throwable) {

        StringBuffer buf = new StringBuffer();
        buf.append("aT('");
        buf.append(Messages.get().getBundle(m_locale).key(Messages.RPT_EXCEPTION_0));
        String exception = CmsEncoder.escapeXml(CmsException.getStackTraceAsString(throwable));
        StringBuffer excBuffer = new StringBuffer(exception.length() + 50);
        StringTokenizer tok = new StringTokenizer(exception, "\r\n");
        while (tok.hasMoreTokens()) {
            excBuffer.append(tok.nextToken());
            excBuffer.append(CmsHtmlReport.LINEBREAK);
        }
        buf.append(CmsStringUtil.escapeJavaScript(excBuffer.toString()));
        buf.append("'); ");
        return buf.toString();
    }
760676
def prettify_exc(error):
    """"""
    matched_exceptions = [k for k in KNOWN_EXCEPTIONS.keys() if k in error]
    if not matched_exceptions:
        return "{}".format(vistir.misc.decode_for_output(error))
    errors = []
    for match in matched_exceptions:
        _, error, info = error.rpartition(KNOWN_EXCEPTIONS[match])
        errors.append("{} {}".format(error, info))

    return "\n".join(errors)
1175643
private String generateAbbreviatedExceptionMessage(final Throwable throwable) {

		final StringBuilder builder = new StringBuilder();
		builder.append(": ");
		builder.append(throwable.getClass().getCanonicalName());
		builder.append(": ");
		builder.append(throwable.getMessage());

		Throwable cause = throwable.getCause();
		while (cause != null) {
			builder.append('\n');
			builder.append("Caused by: ");
			builder.append(cause.getClass().getCanonicalName());
			builder.append(": ");
			builder.append(cause.getMessage());
			// make sure the exception cause is not itself to prevent infinite
			// looping
			assert (cause != cause.getCause());
			cause = (cause == cause.getCause() ? null : cause.getCause());
		}
		return builder.toString();
	}
545989
def last_exception():
    
    exc_type, exc_value, exc_traceback = sys.exc_info()
    return "".join(traceback.format_exception(exc_type, exc_value, exc_traceback))
1296851
public String throwableToString() {
        StringBuilder sb = new StringBuilder("Exception:  ");
        if (throwable != null)
            sb.append(throwable.toString());
        else
            sb.append("null");
        sb.append("\n");
        return sb.toString();
    }
460082
public static String printExceptionWithStackInfo(Throwable throwable) {
        StringBuilder out = new StringBuilder();
        printExceptionWithStackInfo(throwable, out);
        return out.toString();
    }
288340
def p_exception(self, p):
        ''''''
        p[0] = ast.Exc(
            name=p[2], fields=p[4], annotations=p[6], lineno=p.lineno(2)
        )