Package org.apache.hadoop.fs.s3a.commit
Class ValidationFailure
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.hadoop.fs.s3a.commit.ValidationFailure
- All Implemented Interfaces:
Serializable
Exception raised on validation failures; kept as an IOException
for consistency with other failures.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationFailure(String message, Object... args) Create an instance with string formatting applied to the message and arguments. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationFailure
Create an instance with string formatting applied to the message and arguments.- Parameters:
message- error messageargs- optional list of arguments
-
-
Method Details
-
verify
public static void verify(boolean expression, String message, Object... args) throws ValidationFailure Verify that a condition holds.- Parameters:
expression- expression which must be truemessage- message to raise on a failureargs- arguments for the message formatting- Throws:
ValidationFailure- on a failure
-