com.mcdermottroe.exemplar.output
Class OutputException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.mcdermottroe.exemplar.Exception
              extended by com.mcdermottroe.exemplar.output.OutputException
All Implemented Interfaces:
Copyable<Exception>, Serializable, Comparable<Exception>

public class OutputException
extends Exception

An exception that can be thrown in response to any error in the output phase of the program.

Since:
0.1
See Also:
Serialized Form

Field Summary
private  File file
          A File which was involved in the OutputException.
 
Constructor Summary
OutputException()
          OutputException without a description.
OutputException(File f)
          OutputException with an originating File.
OutputException(String message)
          OutputException with a description.
OutputException(String message, File f)
          OutputException with a description and an originating File.
OutputException(String message, Throwable cause)
          OutputException with a description and a reference to an exception which caused it.
OutputException(String message, Throwable cause, File f)
          OutputException with a description, a reference to an exception which caused it and an originating File.
OutputException(Throwable cause)
          OutputException with a reference to the exception that caused it.
OutputException(Throwable cause, File f)
          OutputException with a reference to the exception that caused it and an originating File.
 
Method Summary
 int compareTo(Exception other)
          Implement Comparable.compareTo(Object).
 OutputException getCopy()
          Creates a deep copy of the current object and returns it.
 File getFile()
          Get the file associated with this exception.
 String toString()
          Extend Exception.toString().
 
Methods inherited from class com.mcdermottroe.exemplar.Exception
copyStackTrace, equals, getBackTrace, hashCode
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

file

private final File file
A File which was involved in the OutputException.

Constructor Detail

OutputException

public OutputException()
OutputException without a description.


OutputException

public OutputException(String message)
OutputException with a description.

Parameters:
message - The description of the exception.

OutputException

public OutputException(File f)
OutputException with an originating File.

Parameters:
f - The file involved in the OutputException.

OutputException

public OutputException(String message,
                       File f)
OutputException with a description and an originating File.

Parameters:
message - The description of the exception.
f - The file involved in the OutputException.

OutputException

public OutputException(String message,
                       Throwable cause)
OutputException with a description and a reference to an exception which caused it.

Parameters:
message - The description of the exception.
cause - The cause of the exception.

OutputException

public OutputException(String message,
                       Throwable cause,
                       File f)
OutputException with a description, a reference to an exception which caused it and an originating File.

Parameters:
message - The description of the exception.
cause - The cause of the exception.
f - The file involved in the OutputException.

OutputException

public OutputException(Throwable cause)
OutputException with a reference to the exception that caused it.

Parameters:
cause - The cause of the exception.

OutputException

public OutputException(Throwable cause,
                       File f)
OutputException with a reference to the exception that caused it and an originating File.

Parameters:
cause - The cause of the exception.
f - The File involved in the OutputException.
Method Detail

compareTo

public int compareTo(Exception other)
Implement Comparable.compareTo(Object).

Specified by:
compareTo in interface Comparable<Exception>
Overrides:
compareTo in class Exception
Parameters:
other - The Exception to compare against.
Returns:
A result as defined by Comparable.compareTo(Object).

getCopy

public OutputException getCopy()
Creates a deep copy of the current object and returns it.

Returns:
A deep copy of the current object.

getFile

public File getFile()
Get the file associated with this exception.

Returns:
A File object for the file associated with this exception.

toString

public String toString()
Extend Exception.toString().

Overrides:
toString in class Exception
Returns:
A String representation of this OutputException.