net.sf.jomic.tools
Class ConsoleIOException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by net.sf.jomic.tools.ConsoleIOException
All Implemented Interfaces:
java.io.Serializable

public class ConsoleIOException
extends java.io.IOException

Exception thrown by ConsoleTools.run() if the command fails.

Author:
Thomas Aglassinger
See Also:
ConsoleTools.run(String[], File, int), Serialized Form

Constructor Summary
ConsoleIOException(java.lang.String[] newArguments, int newExpectedExitCode, int newActualExitCode, java.lang.String newLastErrorMessage)
           
 
Method Summary
 int getActualExitCode()
          Get the actual exit code the command failed with.
 java.lang.String[] getArguments()
          Get command and arguments that failed.
 int getExpectedExitCode()
          Get the expected exit code that would have indicated a successfull execution.
 java.lang.String getFullCommand()
          Get the full command with all arguments.
 java.lang.String getLastErrorMessage()
          Get the last error message written by the command to System.err().
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsoleIOException

public ConsoleIOException(java.lang.String[] newArguments,
                          int newExpectedExitCode,
                          int newActualExitCode,
                          java.lang.String newLastErrorMessage)
Method Detail

getActualExitCode

public int getActualExitCode()
Get the actual exit code the command failed with.


getArguments

public java.lang.String[] getArguments()
Get command and arguments that failed. Use arguments[0] to refer to the command.


getExpectedExitCode

public int getExpectedExitCode()
Get the expected exit code that would have indicated a successfull execution.


getFullCommand

public java.lang.String getFullCommand()
Get the full command with all arguments.


getLastErrorMessage

public java.lang.String getLastErrorMessage()
Get the last error message written by the command to System.err().


getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable