Package java.lang.instrument

Examples of java.lang.instrument.IllegalClassFormatException.initCause()


      return instrumenter.instrument(classfileBuffer);
    } catch (Throwable t) {
      final String msg = "Error while instrumenting class %s.";
      final IllegalClassFormatException ex = new IllegalClassFormatException(
          format(msg, classname));
      ex.initCause(t);
      // Report this, as the exception is ignored by the JVM:
      logger.logExeption(ex);
      throw ex;
    }
  }
View Full Code Here


    } catch (final Exception ex) {
      final IllegalClassFormatException wrapper = new IllegalClassFormatException(
          format("Error while instrumenting class %s.", classname));
      // Report this, as the exception is ignored by the JVM:
      logger.logExeption(wrapper);
      throw (IllegalClassFormatException) wrapper.initCause(ex);
    }
  }

  /**
   * Checks whether this class should be instrumented.
View Full Code Here

      classFileDumper.dump(classname, classfileBuffer);
      return instrumenter.instrument(classfileBuffer, classname);
    } catch (final Exception ex) {
      final IllegalClassFormatException wrapper = new IllegalClassFormatException(
          ex.getMessage());
      wrapper.initCause(ex);
      // Report this, as the exception is ignored by the JVM:
      logger.logExeption(wrapper);
      throw wrapper;
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.