/** * Handles error output sent to System.err by this task or its real task. * * @param output The error output to log. Should not be <code>null</code>. */ protected void handleErrorFlush(String output) { if (realThing instanceof Task) { ((Task) realThing).handleErrorFlush(output); } else { super.handleErrorFlush(output); } }
/** * Pass output sent to System.err to the new project. * * @param output The error output to log. Should not be <code>null</code>. * * @since Ant 1.6.2 */ @Override public void handleErrorFlush(String output) { if (ant != null) { ant.handleErrorFlush(output); } else { super.handleErrorFlush(output); } }
/** * Handle error output. * Send it the the new project if is present, otherwise * call the super class. * @param errorOutputToFlush The string to output. * @see Task#handleErrorFlush(String) * @since Ant 1.5.2 */ @Override public void handleErrorFlush(String errorOutputToFlush) { if (newProject != null) { newProject.demuxFlush(errorOutputToFlush, true); } else { super.handleErrorFlush(errorOutputToFlush); } }
/** * Handle error output. * Send it the the new project if is present, otherwise * call the super class. * @param output The string to output. * @see Task#handleErrorFlush(String) * @since Ant 1.5.2 */ public void handleErrorFlush(String output) { if (callee != null) { callee.handleErrorFlush(output); } else { super.handleErrorFlush(output); } } }
/** * Handle output sent to System.err and flush the stream. * * @param output string of stderr. * * @since Ant 1.5.2 */ @Override protected void handleErrorFlush(String output) { if (redirector.getErrorStream() != null) { redirector.handleErrorFlush(output); } else { super.handleErrorFlush(output); } }
/** * Demultiplex flush operations so that each task receives the appropriate * messages. If the current thread is not currently executing a task, * the message is logged directly. * * @since Ant 1.5.2 * * @param output Message to handle. Should not be <code>null</code>. * @param isError Whether the text represents an error (<code>true</code>) * or information (<code>false</code>). */ public void demuxFlush(final String output, final boolean isError) { final Task task = getThreadTask(Thread.currentThread()); if (task == null) { fireMessageLogged(this, output, isError ? MSG_ERR : MSG_INFO); } else if (isError) { task.handleErrorFlush(output); } else { task.handleFlush(output); } }
/** * Pass output sent to System.err to the TestRunner so it can * collect it for the formatters. * * @param output coming from System.err * @since Ant 1.5.2 */ @Override public void handleErrorFlush(final String output) { if (runner != null) { runner.handleErrorFlush(output); if (showOutput) { super.handleErrorFlush(output); } } else { super.handleErrorFlush(output); } }