protected void handleException(final Exception e) throws BuildException { assert e != null; Writer writer = new StringBuilderWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); if (failOnError) { throw new BuildException(message, e, getLocation()); } else { log.error(message); } }
/** * Primary entry point for compiling from the command line * (using the groovyc script). * <p> * If calling inside a process and you don't want the JVM to exit on an * error call commandLineCompile(String[]), which this method simply wraps * * @param args command line arguments * @param lookupUnnamedFiles do a lookup for .groovy files not part of * the given list of files to compile */ public static void commandLineCompileWithErrorHandling(String[] args, boolean lookupUnnamedFiles) { try { commandLineCompile(args, lookupUnnamedFiles); } catch (Throwable e) { new ErrorReporter(e, displayStackTraceOnError).write(System.err); System.exit(1); } }
new ErrorReporter(t, false).write(new PrintWriter(writer)); String message = writer.toString();
/** * Reports the last parsing error to the user. */ private void report() { err.println("Discarding invalid text:"); // TODO: i18n new ErrorReporter(error, false).write(err); }
/** * Reports the last parsing error to the user. */ private void report() { err.println("Discarding invalid text:"); // TODO: i18n new ErrorReporter(error, false).write(err); }
/** * Reports the last parsing error to the user. */ private void report() { err.println("Discarding invalid text:"); // TODO: i18n new ErrorReporter(error, false).write(err); }
/** * Reports the last parsing error to the user. */ private void report() { err.println("Discarding invalid text:"); // TODO: i18n new ErrorReporter(error, false).write(err); }
private void processError(Exception e) { StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); throw new BuildException("Script Failed: " + message, e, getLocation()); }
private void processError(Exception e) { StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); throw new BuildException("Script Failed: " + message, e, getLocation()); }
private void processError(Exception e) { StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); throw new BuildException("Script Failed: " + message, e, getLocation()); }
private void processError(Exception e) { StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); throw new BuildException("Script Failed: " + message, e, getLocation()); }
protected void handleException(final Exception e) throws BuildException { assert e != null; StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); if (failOnError) { throw new BuildException(message, e, getLocation()); } else { log.error(message); } }
protected void handleException(final Exception e) throws BuildException { assert e != null; StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); if (failOnError) { throw new BuildException(message, e, getLocation()); } else { log.error(message); } }
protected void handleException(final Exception e) throws BuildException { assert e != null; StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); if (failOnError) { throw new BuildException(message, e, getLocation()); } else { log.error(message); } }
protected void handleException(final Exception e) throws BuildException { assert e != null; StringWriter writer = new StringWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); if (failOnError) { throw new BuildException(message, e, getLocation()); } else { log.error(message); } }
private void processError(Exception e) { Writer writer = new StringBuilderWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); throw new BuildException("Script Failed: " + message, e, getLocation()); }
/** * Primary entry point for compiling from the command line * (using the groovyc script). * * If calling inside a process and you don't want the JVM to exit on an * error call commandLineCompile(String[]), which this method simply wraps */ public static void main(String[] args) { try { commandLineCompile(args); } catch( Throwable e ) { new ErrorReporter( e, displayStackTraceOnError).write( System.err ); System.exit(1); } }
protected void handleException(final Exception e) throws BuildException { assert e != null; Writer writer = new StringBuilderWriter(); new ErrorReporter(e, false).write(new PrintWriter(writer)); String message = writer.toString(); if (failOnError) { throw new BuildException(message, e, getLocation()); } else { log.error(message); } }
/** * Primary entry point for compiling from the command line * (using the groovyc script). * * If calling inside a process and you don't want the JVM to exit on an * error call commandLineCompile(String[]), which this method simply wraps */ public static void main(String[] args) { try { commandLineCompile(args); } catch( Throwable e ) { new ErrorReporter( e, displayStackTraceOnError).write( System.err ); System.exit(1); } }
/** * Primary entry point for compiling from the command line * (using the groovyc script). * * If calling inside a process and you don't want the JVM to exit on an * error call commandLineCompile(String[]), which this method simply wraps * * @param args command line arguments * @param lookupUnnamedFiles do a lookup for .groovy files not part of * the given list of files to compile */ public static void commandLineCompileWithErrorHandling(String[] args, boolean lookupUnnamedFiles) { try { commandLineCompile(args, lookupUnnamedFiles); } catch( Throwable e ) { new ErrorReporter( e, displayStackTraceOnError).write( System.err ); System.exit(1); } }