org.openmrs.api
Class APIException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.openmrs.api.APIException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
APIAuthenticationException, ConceptInUseException, ConceptNameInUseException, ConceptsLockedException, ContextAuthenticationException, DAOException, DuplicateConceptNameException, ImmutableResultException, ParameterException, PasswordException, PatientIdentifierException, ProposingConceptException, RenderingException, ReportRenderingException, UnallowedIdentifierException

public class APIException
extends java.lang.RuntimeException

Represents often fatal errors that occur within the API infrastructure. All service methods should be marked as possibly throwing this exception. The preferred methods to use in this exception is the APIException(String, Throwable) or the APIException(String)

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
APIException()
          Default empty constructor.
APIException(java.lang.String message)
          General constructor to give the end user a helpful message that relates to why this error occurred.
APIException(java.lang.String message, java.lang.Throwable cause)
          General constructor to give the end user a helpful message and to also propagate the parent error exception message.
APIException(java.lang.Throwable cause)
          Constructor used to simply chain a parent exception cause to an APIException.
 
Method Summary
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

APIException

public APIException()
Default empty constructor. If at all possible, don't use this one, but use the APIException(String) constructor to specify a helpful message to the end user


APIException

public APIException(java.lang.String message)
General constructor to give the end user a helpful message that relates to why this error occurred.

Parameters:
message - helpful message string for the end user

APIException

public APIException(java.lang.String message,
                    java.lang.Throwable cause)
General constructor to give the end user a helpful message and to also propagate the parent error exception message.

Parameters:
message - helpful message string for the end user
cause - the parent exception cause that this APIException is wrapping around

APIException

public APIException(java.lang.Throwable cause)
Constructor used to simply chain a parent exception cause to an APIException. Preference should be given to the APIException(String, Throwable) constructor if at all possible instead of this one.

Parameters:
cause - the parent exception cause that this APIException is wrapping around

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change