Class ScheduleException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- com.opengamma.strata.basics.schedule.ScheduleException
-
- All Implemented Interfaces:
Serializable
public final class ScheduleException extends IllegalArgumentException
Exception thrown when a schedule cannot be calculated.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScheduleException(PeriodicSchedule definition, String msgTemplate, Object... msgArguments)
Creates an instance, specifying the definition that caused the problem.ScheduleException(String msgTemplate, Object... msgArguments)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<PeriodicSchedule>
getDefinition()
Gets the invalid schedule definition.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ScheduleException
public ScheduleException(String msgTemplate, Object... msgArguments)
Creates an instance.The message is formatted using
Messages.format(String, Object...)
. Message formatting is null tolerant to avoid hiding this exception.- Parameters:
msgTemplate
- the message template, null tolerantmsgArguments
- the message arguments, null tolerant
-
ScheduleException
public ScheduleException(PeriodicSchedule definition, String msgTemplate, Object... msgArguments)
Creates an instance, specifying the definition that caused the problem.The message is formatted using
Messages.format(String, Object...)
. Message formatting is null tolerant to avoid hiding this exception.- Parameters:
definition
- the invalid schedule definition, null tolerantmsgTemplate
- the message template, null tolerantmsgArguments
- the message arguments, null tolerant
-
-
Method Detail
-
getDefinition
public Optional<PeriodicSchedule> getDefinition()
Gets the invalid schedule definition.- Returns:
- the optional definition
-
-