org.openmrs.module
Class MandatoryModuleException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.openmrs.module.ModuleMustStartException
                  extended by org.openmrs.module.MandatoryModuleException
All Implemented Interfaces:
java.io.Serializable

public class MandatoryModuleException
extends ModuleMustStartException

This error is thrown when OpenMRS is started but a module marked as 'mandatory' but was unable to start.

This error is also thrown when trying to stop a module that is marked as mandatory.

See Also:
Context#startup(), ModuleUtil.getMandatoryModules(), Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
MandatoryModuleException(java.util.List<java.lang.String> moduleIds)
           
MandatoryModuleException(java.lang.String moduleId)
          This constructor is used when a user tries to stop a mandatory module.
MandatoryModuleException(java.lang.String moduleId, java.lang.String extraErrorMessage)
          This constructor is used when a user tries to stop a mandatory module.
 
Method Summary
 java.lang.String getModuleId()
          The id (or ids) of the module that is mandatory
 
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

MandatoryModuleException

public MandatoryModuleException(java.lang.String moduleId)
This constructor is used when a user tries to stop a mandatory module.

Parameters:
moduleId - the module id that is trying to be stopped

MandatoryModuleException

public MandatoryModuleException(java.lang.String moduleId,
                                java.lang.String extraErrorMessage)
This constructor is used when a user tries to stop a mandatory module.

Parameters:
moduleId - the module id that is trying to be stopped
extraErrorMessage - extra data to provide in the error's message

MandatoryModuleException

public MandatoryModuleException(java.util.List<java.lang.String> moduleIds)
Parameters:
moduleIds - list of module ids that are mandatory and didn't start
Method Detail

getModuleId

public java.lang.String getModuleId()
The id (or ids) of the module that is mandatory

Returns:
the module id (or ids) that caused this exception

OpenMRS-1.7.x

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