Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.logging;
 
 
     private static final String PREFIX = "! ";
    @Override
    protected String throwableProxyToString(IThrowableProxy tp) {
        final StringBuilder buf = new StringBuilder(32);
        IThrowableProxy currentThrowable = tp;
        while (currentThrowable != null) {
            subjoinThrowableProxy(bufcurrentThrowable);
            currentThrowable = currentThrowable.getCause();
        }
        return buf.toString();
    }
        subjoinFirstLine(buftp);
        buf.append(.);
        final StackTraceElementProxy[] stepArray = tp.getStackTraceElementProxyArray();
        final int commonFrames = tp.getCommonFrames();
        int maxIndex = stepArray.length;
        if (commonFrames > 0) {
            maxIndex -= commonFrames;
        }
        for (int i = 0; i < maxIndexi++) {
            final String string = stepArray[i].toString();
            buf.append();
            buf.append(string);
            extraData(bufstepArray[i]); // allow other data to be added
            buf.append(.);
        }
        if (commonFrames > 0) {
            buf.append("!... ").append(tp.getCommonFrames()).append(
                    " common frames omitted").append(.);
        }
    }
    private void subjoinFirstLine(StringBuilder bufIThrowableProxy tp) {
        final int commonFrames = tp.getCommonFrames();
        if (commonFrames > 0) {
            buf.append(.);
        }
        subjoinExceptionMessage(buftp);
    }
    private void subjoinExceptionMessage(StringBuilder bufIThrowableProxy tp) {
        buf.append().append(tp.getClassName()).append(": ").append(tp.getMessage());
    }
New to GrepCode? Check out our FAQ X