Class RuntimeExceptionFactory
java.lang.Object
org.springframework.data.gemfire.util.RuntimeExceptionFactory
The
RuntimeExceptionFactory
class is a factory for creating common RuntimeExceptions
with the added convenience of message formatting and optional causes
.- Since:
- 1.0.0
- Author:
- John Blum
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
static IllegalArgumentException
newIllegalArgumentException
(String message, Object... args) Constructs and initializes anIllegalArgumentException
with the givenmessage
andarguments
used to format the message.static IllegalArgumentException
newIllegalArgumentException
(Throwable cause, String message, Object... args) Constructs and initializes anIllegalArgumentException
with the givencause
,message
andarguments
used to format the message.static IllegalStateException
newIllegalStateException
(String message, Object... args) Constructs and initializes anIllegalStateException
with the givenmessage
andarguments
used to format the message.static IllegalStateException
newIllegalStateException
(Throwable cause, String message, Object... args) Constructs and initializes anIllegalStateException
with the givencause
,message
andarguments
used to format the message.static RuntimeException
newRuntimeException
(String message, Object... args) Constructs and initializes anRuntimeException
with the givenmessage
andarguments
used to format the message.static RuntimeException
newRuntimeException
(Throwable cause, String message, Object... args) Constructs and initializes anRuntimeException
with the givencause
,message
andarguments
used to format the message.newUnsupportedOperationException
(String message, Object... args) Constructs and initializes anUnsupportedOperationException
with the givenmessage
andarguments
used to format the message.newUnsupportedOperationException
(Throwable cause, String message, Object... args) Constructs and initializes anUnsupportedOperationException
with the givencause
,message
andarguments
used to format the message.
-
Field Details
-
NOT_IMPLEMENTED
- See Also:
-
NOT_SUPPORTED
- See Also:
-
-
Constructor Details
-
RuntimeExceptionFactory
public RuntimeExceptionFactory()
-
-
Method Details
-
newIllegalArgumentException
Constructs and initializes anIllegalArgumentException
with the givenmessage
andarguments
used to format the message. -
newIllegalArgumentException
public static IllegalArgumentException newIllegalArgumentException(Throwable cause, String message, Object... args) Constructs and initializes anIllegalArgumentException
with the givencause
,message
andarguments
used to format the message.- Parameters:
cause
-Throwable
identifying the reason theIllegalArgumentException
was thrown.message
-String
describing theexception
.args
-arguments
used to replace format placeholders in themessage
.- Returns:
- a new
IllegalArgumentException
with the givencause
andmessage
. - See Also:
-
newIllegalStateException
Constructs and initializes anIllegalStateException
with the givenmessage
andarguments
used to format the message. -
newIllegalStateException
public static IllegalStateException newIllegalStateException(Throwable cause, String message, Object... args) Constructs and initializes anIllegalStateException
with the givencause
,message
andarguments
used to format the message.- Parameters:
cause
-Throwable
identifying the reason theIllegalStateException
was thrown.message
-String
describing theexception
.args
-arguments
used to replace format placeholders in themessage
.- Returns:
- a new
IllegalStateException
with the givencause
andmessage
. - See Also:
-
newRuntimeException
Constructs and initializes anRuntimeException
with the givenmessage
andarguments
used to format the message. -
newRuntimeException
Constructs and initializes anRuntimeException
with the givencause
,message
andarguments
used to format the message.- Parameters:
cause
-Throwable
identifying the reason theRuntimeException
was thrown.message
-String
describing theexception
.args
-arguments
used to replace format placeholders in themessage
.- Returns:
- a new
RuntimeException
with the givencause
andmessage
. - See Also:
-
newUnsupportedOperationException
public static UnsupportedOperationException newUnsupportedOperationException(String message, Object... args) Constructs and initializes anUnsupportedOperationException
with the givenmessage
andarguments
used to format the message. -
newUnsupportedOperationException
public static UnsupportedOperationException newUnsupportedOperationException(Throwable cause, String message, Object... args) Constructs and initializes anUnsupportedOperationException
with the givencause
,message
andarguments
used to format the message.- Parameters:
cause
-Throwable
identifying the reason theUnsupportedOperationException
was thrown.message
-String
describing theexception
.args
-arguments
used to replace format placeholders in themessage
.- Returns:
- a new
UnsupportedOperationException
with the givencause
andmessage
. - See Also:
-
format
-