public class AlluxioRuntimeException extends RuntimeException
InternalRuntimeException
.
2. Throw new AlluxioRuntimeException directly.
3. Try not to use AlluxioRuntimeException.from(cause). This method used when you catch a very
general cause(ex.IOException
) and is mainly for compatibilityConstructor and Description |
---|
AlluxioRuntimeException(io.grpc.Status status,
String message,
Throwable cause,
ErrorType errorType,
boolean retryable,
com.google.protobuf.Any... details) |
Modifier and Type | Method and Description |
---|---|
static AlluxioRuntimeException |
from(AlluxioStatusException t)
Converts an arbitrary AlluxioStatusException to an Alluxio runtime exception.
|
static AlluxioRuntimeException |
from(IOException ioe)
Converts an IOException to a corresponding runtime exception.
|
static AlluxioRuntimeException |
from(RuntimeException t)
Converts an arbitrary RuntimeException to an Alluxio runtime exception.
|
static AlluxioRuntimeException |
from(Throwable t)
Converts an arbitrary throwable to an Alluxio runtime exception.
|
String |
getMessage() |
io.grpc.Status |
getStatus() |
boolean |
isRetryable() |
io.grpc.StatusException |
toGrpcStatusException() |
io.grpc.StatusRuntimeException |
toGrpcStatusRuntimeException() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AlluxioRuntimeException(io.grpc.Status status, String message, @Nullable Throwable cause, ErrorType errorType, boolean retryable, @Nullable com.google.protobuf.Any... details)
status
- the grpc status code for this exceptionmessage
- the error messagecause
- the exceptionerrorType
- error typeretryable
- client can retry or notdetails
- the additional information neededpublic io.grpc.Status getStatus()
public boolean isRetryable()
public io.grpc.StatusException toGrpcStatusException()
public io.grpc.StatusRuntimeException toGrpcStatusRuntimeException()
public static AlluxioRuntimeException from(Throwable t)
t
- exceptionpublic static AlluxioRuntimeException from(RuntimeException t)
t
- exceptionpublic static AlluxioRuntimeException from(AlluxioStatusException t)
t
- exceptionpublic static AlluxioRuntimeException from(IOException ioe)
ioe
- the IO exception to convertpublic String getMessage()
getMessage
in class Throwable
Copyright © 2023. All Rights Reserved.