Class InvalidArgumentException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- africa.absa.inception.core.service.ServiceException
-
- africa.absa.inception.core.service.InvalidArgumentException
-
- All Implemented Interfaces:
Serializable
public class InvalidArgumentException extends ServiceException
The InvalidArgumentException exception is thrown to indicate an error condition as a result of an invalid argument.This is a checked exception to prevent the automatic rollback of the current transaction.
- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidArgumentException(String parameter)Constructs a new InvalidArgumentException.InvalidArgumentException(String parameter, List<ValidationError> validationErrors)Constructs a new InvalidArgumentException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvalidArgumentErrorgetFaultInfo()Returns the fault info.InvalidArgumentErrorgetInvalidArgumentError()Returns the invalid argument error info.StringgetParameter()Returns the name of the parameter associated with the invalid argument.List<ValidationError>getValidationErrors()Returns the optional validation errors associated with the invalid argument.-
Methods inherited from class africa.absa.inception.core.service.ServiceException
getTimestamp
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InvalidArgumentException
public InvalidArgumentException(String parameter)
Constructs a new InvalidArgumentException.- Parameters:
parameter- the name of the parameter associated with the invalid argument
-
InvalidArgumentException
public InvalidArgumentException(String parameter, List<ValidationError> validationErrors)
Constructs a new InvalidArgumentException.- Parameters:
parameter- the name of the parameter associated with the invalid argumentvalidationErrors- the validation errors associated with the invalid argument
-
-
Method Detail
-
getFaultInfo
public InvalidArgumentError getFaultInfo()
Returns the fault info.- Overrides:
getFaultInfoin classServiceException- Returns:
- the fault info
-
getInvalidArgumentError
public InvalidArgumentError getInvalidArgumentError()
Returns the invalid argument error info.- Returns:
- the invalid argument error info
-
getParameter
public String getParameter()
Returns the name of the parameter associated with the invalid argument.- Returns:
- the name of the parameter associated with the invalid argument
-
getValidationErrors
public List<ValidationError> getValidationErrors()
Returns the optional validation errors associated with the invalid argument.- Returns:
- the optional validation errors associated with the invalid argument
-
-