public final class P4JavaExceptions
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T,R> Function<T,R> |
rethrowFunction(FunctionWithException<T,R> function) |
static void |
throwAccessExceptionIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwConnectionException(java.lang.String message,
java.lang.Object... args) |
static void |
throwConnectionException(java.lang.Throwable cause) |
static void |
throwConnectionException(java.lang.Throwable cause,
java.lang.String message,
java.lang.Object... args) |
static void |
throwConnectionExceptionIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwIOException(java.lang.String message,
java.lang.Object... args) |
static void |
throwIOException(java.lang.Throwable cause) |
static void |
throwIOException(java.lang.Throwable cause,
java.lang.String message,
java.lang.Object... args) |
static void |
throwIOExceptionIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args) |
static void |
throwOptionsException(java.lang.String message,
java.lang.Object... args) |
static void |
throwOptionsException(java.lang.Throwable cause) |
static void |
throwOptionsException(java.lang.Throwable cause,
java.lang.String message,
java.lang.Object... args) |
static void |
throwOptionsExceptionIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwP4JavaError(java.lang.String message,
java.lang.Object... args) |
static void |
throwP4JavaError(java.lang.Throwable cause,
java.lang.String message,
java.lang.Object... args) |
static void |
throwP4JavaErrorIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwProtocolErrorIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwRequestExceptionIfConditionFails(boolean expression,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwRequestExceptionIfConditionFails(boolean expression,
java.lang.String codeString,
java.lang.String message,
java.lang.Object... args)
If the check
expression fails; then ConnectionException will throw
with given error message message |
static void |
throwRequestExceptionIfPerforceServerVersionOldThanExpected(boolean expression,
java.lang.String message,
java.lang.Object... args) |
public static void throwConnectionExceptionIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws ConnectionException
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressionmessage
- messageargs
- argsConnectionException
- on errorpublic static void throwConnectionException(java.lang.String message, java.lang.Object... args) throws ConnectionException
ConnectionException
public static void throwConnectionException(java.lang.Throwable cause) throws ConnectionException
ConnectionException
public static void throwConnectionException(java.lang.Throwable cause, java.lang.String message, java.lang.Object... args) throws ConnectionException
ConnectionException
public static void throwProtocolErrorIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws ProtocolError
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressionmessage
- messageargs
- argsProtocolError
- on errorpublic static void throwP4JavaErrorIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws P4JavaError
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressionmessage
- messageargs
- argsP4JavaError
- on errorpublic static void throwP4JavaError(java.lang.Throwable cause, java.lang.String message, java.lang.Object... args) throws P4JavaError
P4JavaError
public static void throwP4JavaError(java.lang.String message, java.lang.Object... args) throws P4JavaError
P4JavaError
public static void throwOptionsExceptionIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws OptionsException
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressionmessage
- messageargs
- argsOptionsException
- on errorpublic static void throwOptionsException(java.lang.Throwable cause, java.lang.String message, java.lang.Object... args) throws OptionsException
OptionsException
public static void throwOptionsException(java.lang.Throwable cause) throws OptionsException
OptionsException
public static void throwOptionsException(java.lang.String message, java.lang.Object... args) throws OptionsException
OptionsException
public static void throwRequestExceptionIfConditionFails(boolean expression, java.lang.String codeString, java.lang.String message, java.lang.Object... args) throws RequestException
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressioncodeString
- codeStringmessage
- messageargs
- argsRequestException
- on errorpublic static void throwRequestExceptionIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws RequestException
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressionmessage
- messageargs
- argsRequestException
- on errorpublic static void throwRequestExceptionIfPerforceServerVersionOldThanExpected(boolean expression, java.lang.String message, java.lang.Object... args) throws RequestException
RequestException
public static void throwAccessExceptionIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws AccessException
expression
fails; then ConnectionException
will throw
with given error message message
expression
- expressionmessage
- messageargs
- argsAccessException
- on errorpublic static void throwIOException(java.lang.Throwable cause) throws java.io.IOException
java.io.IOException
public static void throwIOException(java.lang.Throwable cause, java.lang.String message, java.lang.Object... args) throws java.io.IOException
java.io.IOException
public static void throwIOException(java.lang.String message, java.lang.Object... args) throws java.io.IOException
java.io.IOException
public static void throwIOExceptionIfConditionFails(boolean expression, java.lang.String message, java.lang.Object... args) throws java.io.IOException
java.io.IOException
public static <T,R> Function<T,R> rethrowFunction(FunctionWithException<T,R> function)