private void throwError(final Analyzer<BasicValue> analyzer, final Exception e) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter, true); CheckClassAdapter.printAnalyzerResult(this, analyzer, printWriter); printWriter.close(); throw new IllegalArgumentException(e.getMessage() + ' ' + stringWriter.toString(), e); } },
private void throwError(final Analyzer<BasicValue> analyzer, final Exception e) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter, true); CheckClassAdapter.printAnalyzerResult(this, analyzer, printWriter); printWriter.close(); throw new IllegalArgumentException(e.getMessage() + ' ' + stringWriter.toString(), e); } },
@Override public void visitEnd() { Analyzer<BasicValue> a = new Analyzer<BasicValue>( new BasicVerifier()); try { a.analyze("dummy", this); } catch (Exception e) { if (e instanceof IndexOutOfBoundsException && maxLocals == 0 && maxStack == 0) { throw new RuntimeException( "Data flow checking option requires valid, non zero maxLocals and maxStack values."); } e.printStackTrace(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw, true); CheckClassAdapter.printAnalyzerResult(this, a, pw); pw.close(); throw new RuntimeException(e.getMessage() + ' ' + sw.toString()); } accept(cmv); } }, labels);
e.printStackTrace(pw); printAnalyzerResult(method, a, pw);
printAnalyzerResult(method, analyzer, printWriter);
printAnalyzerResult(method, analyzer, printWriter);