try
{
CommandLineUtils.StringStreamConsumer out = new CommandLineUtils.StringStreamConsumer();
CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
int exitCode = CommandLineUtils.executeCommandLine( cl, out, err );
Streams streams = new Streams();
streams.setOut( out.getOutput() );
streams.setErr( err.getOutput() );
fireSessionDebug( streams.getOut() );
fireSessionDebug( streams.getErr() );
if ( exitCode != 0 )
{
if ( !ignoreFailures || exitCode == SSH_FATAL_EXIT_CODE )
{
throw new CommandExecutionException( "Exit code " + exitCode + " - " + err.getOutput() );