com.marringtons.util
Class ProgrammingErrorException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended bycom.marringtons.util.ProgrammingErrorException
All Implemented Interfaces:
Serializable

public class ProgrammingErrorException
extends RuntimeException

Effective Java: Programming Language Guide by Joshua Bloch Item 40:Use checked exceptions for recoverable conditions and run-time exceptions for programming errors.

Author:
Paul Marrington
See Also:
Serialized Form

Constructor Summary
ProgrammingErrorException(Object message)
          When a programming error is detected in the normal course of the application - such as a an unexpected value in a method call parameter, create an exception of this type.
ProgrammingErrorException(Object message, Throwable cause)
          Sometime the causing exception does not provide enough information for the developer to deduce and repair the code problem.
ProgrammingErrorException(Throwable cause)
          When a programming error causes a checked exception, attach it to this exception to provide additional information.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgrammingErrorException

public ProgrammingErrorException(Object message)
When a programming error is detected in the normal course of the application - such as a an unexpected value in a method call parameter, create an exception of this type.

Parameters:
message - Message to attached to the stack dump (uses toString()).

ProgrammingErrorException

public ProgrammingErrorException(Throwable cause)
When a programming error causes a checked exception, attach it to this exception to provide additional information.

Parameters:
cause - The exception that causes the code to throw a ProgrammingErrorException.

ProgrammingErrorException

public ProgrammingErrorException(Object message,
                                 Throwable cause)
Sometime the causing exception does not provide enough information for the developer to deduce and repair the code problem. In these cases a more detailed message is required.

Parameters:
message - Message to attached to the stack dump.
cause - The exception that causes the code to throw a ProgrammingErrorException.


Copyright © 2005 Paul Marrington http://library.marringtons.com