Class IllegalArgFailureException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- com.opengamma.strata.collect.result.IllegalArgFailureException
-
- All Implemented Interfaces:
FailureItemProvider
,Serializable
public class IllegalArgFailureException extends IllegalArgumentException implements FailureItemProvider
Exception thrown when input is invalid.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IllegalArgFailureException(FailureItem item)
Returns an exception wrapping the failure item.IllegalArgFailureException(String messageTemplate, Object... messageArgs)
Returns an exception from a message.IllegalArgFailureException(Throwable cause, String messageTemplate, Object... messageArgs)
Returns an exception from a cause and message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FailureItem
getFailureItem()
Gets the failure item.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
IllegalArgFailureException
public IllegalArgFailureException(FailureItem item)
Returns an exception wrapping the failure item.The failure item should have a reason of 'Invalid'.
- Parameters:
item
- the failure item
-
IllegalArgFailureException
public IllegalArgFailureException(String messageTemplate, Object... messageArgs)
Returns an exception from a message.The message is produced using a template that contains zero to many "{argName}" placeholders. Each placeholder is replaced by the next available argument. If there are too few arguments, then the message will be left with placeholders. If there are too many arguments, then the excess arguments are appended to the end of the message. No attempt is made to format the arguments. See
Messages.formatWithAttributes(String, Object...)
for more details.- Parameters:
messageTemplate
- a message explaining the failure, not empty, uses "{argName}" for insertingmessageArgs
messageArgs
- the arguments for the message
-
IllegalArgFailureException
public IllegalArgFailureException(Throwable cause, String messageTemplate, Object... messageArgs)
Returns an exception from a cause and message.The message is produced using a template that contains zero to many "{argName}" placeholders. Each placeholder is replaced by the next available argument. If there are too few arguments, then the message will be left with placeholders. If there are too many arguments, then the excess arguments are appended to the end of the message. No attempt is made to format the arguments. See
Messages.formatWithAttributes(String, Object...)
for more details.- Parameters:
cause
- the causemessageTemplate
- a message explaining the failure, not empty, uses "{argName}" for insertingmessageArgs
messageArgs
- the arguments for the message
-
-
Method Detail
-
getFailureItem
public FailureItem getFailureItem()
Gets the failure item.- Specified by:
getFailureItem
in interfaceFailureItemProvider
- Returns:
- the failure item
-
-