Package org.grails.exceptions.reporting

Examples of org.grails.exceptions.reporting.DefaultStackTraceFilterer


            stackFilterer = (StackTraceFilterer)GrailsClassUtils.instantiateFromFlatConfig(
                    grailsApplication.getFlatConfig(), "grails.logging.stackTraceFiltererClass", DefaultStackTraceFilterer.class.getName());
        }
        catch (Throwable t) {
            logger.error("Problem instantiating StackTracePrinter class, using default: " + t.getMessage());
            stackFilterer = new DefaultStackTraceFilterer();
        }
    }
View Full Code Here


        Throwable exception = failure.getException();
        if (exception == null) {
            console.error(failure.getMessage());
        }
        else {
            StackTraceFilterer filterer = new DefaultStackTraceFilterer();
            filterer.setCutOffPackage("org.junit");
            filterer.filter(exception, true);

            StringWriter sw = new StringWriter();
            PrintWriter ps = new PrintWriter(sw);
            exception.printStackTrace(ps);
View Full Code Here

public class TestStacktraceSanitizer {

    private static final String TEST_RUNNING_CLASS = "_GrailsTest";

    public static Throwable sanitize(Throwable t) {
        new DefaultStackTraceFilterer().filter(t, true);
        StackTraceElement[] trace = t.getStackTrace();
        List<StackTraceElement> newTrace = new ArrayList<StackTraceElement>();
        for (StackTraceElement stackTraceElement : trace) {
            if (stackTraceElement.getClassName().startsWith(TEST_RUNNING_CLASS)) {
                break;
View Full Code Here

            stackTraceFilterer = (StackTraceFilterer)GrailsResourceUtils.instantiateFromConfig(
                    config, "grails.logging.stackTraceFiltererClass", DefaultStackTraceFilterer.class.getName());
        }
        catch (Throwable t) {
            LogLog.error("Problem instantiating StackTraceFilter class, using default: " + t.getMessage());
            stackTraceFilterer = new DefaultStackTraceFilterer();
        }
    }
View Full Code Here

        return ft;
    }

    private final Throwable cleanIfException(final Throwable t) {
        if (t != null) {
            new DefaultStackTraceFilterer().filter(t, true);
        }
        return t;
    }
View Full Code Here

TOP

Related Classes of org.grails.exceptions.reporting.DefaultStackTraceFilterer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.