org.sonatype.gshell.shell
Class ShellErrorHandler

java.lang.Object
  extended by org.sonatype.gshell.shell.ShellErrorHandler
All Implemented Interfaces:
ConsoleErrorHandler

public class ShellErrorHandler
extends Object
implements ConsoleErrorHandler

Shell ConsoleErrorHandler which renders errors with ANSI codes.

Since:
2.0
Author:
Jason Dillon

Constructor Summary
ShellErrorHandler(IO io, javax.inject.Provider<Variables> variables)
           
 
Method Summary
 boolean handleError(Throwable error)
          Called when an error occurs while executing a ConsoleTask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShellErrorHandler

@Inject
public ShellErrorHandler(IO io,
                                javax.inject.Provider<Variables> variables)
Method Detail

handleError

public boolean handleError(Throwable error)
Description copied from interface: ConsoleErrorHandler
Called when an error occurs while executing a ConsoleTask.

Specified by:
handleError in interface ConsoleErrorHandler
Parameters:
error - The error which has occurred.
Returns:
True to allow the console to continue, false to abort it.


Copyright © 2008-2011 Sonatype. All Rights Reserved.