Class ParseFailureException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- com.opengamma.strata.collect.result.ParseFailureException
-
- All Implemented Interfaces:
FailureItemProvider
,Serializable
- Direct Known Subclasses:
FpmlParseException
public class ParseFailureException extends IllegalArgumentException implements FailureItemProvider
Exception thrown when parsing.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParseFailureException(FailureItem item)
Returns an exception wrapping the failure item.ParseFailureException(String messageTemplate, Object... messageArgs)
Returns an exception from a message.ParseFailureException(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
-
ParseFailureException
public ParseFailureException(FailureItem item)
Returns an exception wrapping the failure item.The failure item should have a reason of 'Parsing'.
- Parameters:
item
- the failure item
-
ParseFailureException
public ParseFailureException(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
-
ParseFailureException
public ParseFailureException(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
-
-