org.openmrs.api
Class BlankIdentifierException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.openmrs.api.APIException
                  extended by org.openmrs.api.PatientIdentifierException
                      extended by org.openmrs.api.BlankIdentifierException
All Implemented Interfaces:
java.io.Serializable

public class BlankIdentifierException
extends PatientIdentifierException

Exception thrown when a Patient or PatientIdentifier is being saved with an empty or null PatientIdentifier.getIdentifier()

See Also:
PatientService, PatientIdentifierException, Serialized Form

Constructor Summary
BlankIdentifierException()
          Default empty constructor.
BlankIdentifierException(java.lang.String message)
          General constructor to give the end user a helpful message that relates to why this error occurred.
BlankIdentifierException(java.lang.String message, PatientIdentifier identifier)
          This is the preferred constructor.
BlankIdentifierException(java.lang.String message, java.lang.Throwable cause)
          Convenience constructor used to simply wrap around a different error cause
BlankIdentifierException(java.lang.Throwable cause)
          Constructor used to only wrap around a parent cause.
 
Method Summary
 
Methods inherited from class org.openmrs.api.PatientIdentifierException
getPatientIdentifier, setPatientIdentifier
 
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
 

Constructor Detail

BlankIdentifierException

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


BlankIdentifierException

public BlankIdentifierException(java.lang.String message)
General constructor to give the end user a helpful message that relates to why this error occurred. Preference should be given to BlankIdentifierException(String, PatientIdentifier) over this constructor

Parameters:
message - helpful message string for the end user

BlankIdentifierException

public BlankIdentifierException(java.lang.String message,
                                PatientIdentifier identifier)
This is the preferred constructor. This gives the end user both a message as to why this error occurred and the identifier which is blank.

Parameters:
message - helpful message string for the end user
identifier - the identifier that is blank

BlankIdentifierException

public BlankIdentifierException(java.lang.String message,
                                java.lang.Throwable cause)
Convenience constructor used to simply wrap around a different error cause

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

BlankIdentifierException

public BlankIdentifierException(java.lang.Throwable cause)
Constructor used to only wrap around a parent cause. Preference should be given to the BlankIdentifierException(String, Throwable) constructor before this one.

Parameters:
cause - the parent wrapping cause

OpenMRS-1.7.x

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