Example usage for org.aspectj.bridge AbortException printStackTrace

List of usage examples for org.aspectj.bridge AbortException printStackTrace

Introduction

In this page you can find the example usage for org.aspectj.bridge AbortException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Usage

From source file:sf.arunner.ARunnerWeavingClassLoader.java

License:Open Source License

protected Class<?> defineClass(String name, byte[] b, CodeSource cs) throws IOException {
    if (DEBUG)/*from w  w w .j av  a 2 s  .  co m*/
        System.out.println("# defineClass(): " + name);
    byte saveb[] = b;
    if (!initializingAdaptor) {
        if (adapter == null) {
            createAdaptor();
        }
        try {
            b = adapter.weaveClass(name, b, false);
        } catch (AbortException e) {
            throw e;
        } catch (Throwable e) {
        }
    }
    try {
        return super.defineClass(name, b, cs);
    } catch (Throwable e) {
        System.err.println("Weaving failed, using unweaved class");
        e.printStackTrace();
        return super.defineClass(name, saveb, cs);
    }
}