Package io.mosip.kernel.core.exception
Class BaseUncheckedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.mosip.kernel.core.exception.BaseUncheckedException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArithmeticException,ArrayIndexOutOfBoundsException,AuditManagerException,AuthNException,AuthZException,CertificateProcessingException,ClassNameNotFoundException,ConnectionException,DataAccessLayerException,DataMapperException,DirectoryNotEmptyException,EmptyPathException,EmptyPatternException,FileNameNotProvided,FSAdapterException,IllegalArgumentException,IllegalConfigurationException,IllegalIdentityException,IllegalStateException,ImplementationNotFound,InvalidDataException,InvalideEmailException,InvalidIDException,InvalidInputException,InvalidKeyException,InvalidNumberException,InvalidParamSpecException,InvalidPhoneNumberException,InvalidPinException,InvalidTransliterationException,InValidUinException,KeystoreProcessingException,MosipInvalidDataException,MosipInvalidKeyException,MosipNoSuchAlgorithmException,MosipNullDataException,MosipNullKeyException,MosipNullMethodException,NoSessionException,NoSuchAlgorithmException,NoSuchAliasException,NoSuchSecurityProviderException,NotANumberException,NotFiniteNumberException,NotPositiveException,NullConfigurationException,NullDataException,NullKeyException,NullMethodException,NullPathException,NullPointerException,NumberIsTooLargeException,PacketSizeException,ParseException,ParseResponseException,PatternSyntaxException,PDFGeneratorException,PridGenerationException,SaltGeneratorException,SFTPException,SignatureException,SignatureUtilClientException,SignatureUtilException,TemplateConfigurationException,TemplateMethodInvocationException,TemplateParsingException,TemplateResourceNotFoundException,TokenIdGeneratorException,UnsupportedCharsetException,VidGenerationFailedException,VirusScannerException,XMLConfigurationParseException
public class BaseUncheckedException extends RuntimeException
This is the base class for all MOSIP unchecked exceptions.BaseUncheckedExceptionis the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.RuntimeExceptionand its subclasses are unchecked exceptions. Unchecked exceptions do not need to be declared in a method or constructor'sthrowsclause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary.- Since:
- 1.0
- Author:
- Shashank Agrawal Compile-Time Checking of Exceptions
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMPTY_SPACE
-
Constructor Summary
Constructors Constructor Description BaseUncheckedException()Constructs a new unchecked exceptionBaseUncheckedException(String errorMessage)Constructs a new checked exception with errorMessageBaseUncheckedException(String errorCode, String errorMessage)Constructs a new unchecked exception with the specified detail message and error code.BaseUncheckedException(String errorCode, String errorMessage, Throwable rootCause)Constructs a new unchecked exception with the specified detail message and error code and error cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseUncheckedExceptionaddInfo(String errorCode, String errorText)This method add the information of error code and error message.List<String>getCodes()Returns the list of error codes.StringgetErrorCode()Return the last error code.StringgetErrorText()Return the last exception message.List<String>getErrorTexts()Returns the list of exception messages.StringgetMessage()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
EMPTY_SPACE
public static final String EMPTY_SPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BaseUncheckedException
public BaseUncheckedException()
Constructs a new unchecked exception
-
BaseUncheckedException
public BaseUncheckedException(String errorMessage)
Constructs a new checked exception with errorMessage- Parameters:
errorMessage- the detail message.
-
BaseUncheckedException
public BaseUncheckedException(String errorCode, String errorMessage)
Constructs a new unchecked exception with the specified detail message and error code.- Parameters:
errorMessage- the detail message.errorCode- the error code.
-
BaseUncheckedException
public BaseUncheckedException(String errorCode, String errorMessage, Throwable rootCause)
Constructs a new unchecked exception with the specified detail message and error code and error cause.- Parameters:
errorCode- the error codeerrorMessage- the detail message.rootCause- the specified cause
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
addInfo
public BaseUncheckedException addInfo(String errorCode, String errorText)
This method add the information of error code and error message.- Parameters:
errorCode- the error codeerrorText- the detail message.- Returns:
- the instance of current BaseCheckedException
-
getCodes
public List<String> getCodes()
Returns the list of error codes.- Returns:
- the list of error codes
-
getErrorTexts
public List<String> getErrorTexts()
Returns the list of exception messages.- Returns:
- the list of exception messages
-
getErrorCode
public String getErrorCode()
Return the last error code.- Returns:
- the last error code
-
getErrorText
public String getErrorText()
Return the last exception message.- Returns:
- the last exception message
-
-