Class ArmeriaStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.linecorp.armeria.common.grpc.protocol.ArmeriaStatusException
- All Implemented Interfaces:
Serializable
An
Exception that contains enough information to convert it to a gRPC status.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionArmeriaStatusException(int code, @Nullable String message) Constructs anArmeriaStatusExceptionfor the given gRPC status code and message.ArmeriaStatusException(int code, @Nullable String message, @com.linecorp.armeria.common.annotation.Nullable byte[] grpcStatusDetailsBin) Constructs anArmeriaStatusExceptionfor the given gRPC status code, message and grpcStatusDetailsBin.ArmeriaStatusException(int code, @Nullable String message, @com.linecorp.armeria.common.annotation.Nullable byte[] grpcStatusDetailsBin, @Nullable Throwable cause) Constructs anArmeriaStatusExceptionfor the given gRPC status code, message, grpcStatusDetailsBin and cause.ArmeriaStatusException(int code, @Nullable String message, @Nullable Throwable cause) Constructs anArmeriaStatusExceptionfor the given gRPC status code, message and cause. -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns the gRPC status code for thisArmeriaStatusException.@com.linecorp.armeria.common.annotation.Nullable byte[]Returns the gRPC details binary for thisArmeriaStatusException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ArmeriaStatusException
Constructs anArmeriaStatusExceptionfor the given gRPC status code and message. -
ArmeriaStatusException
public ArmeriaStatusException(int code, @Nullable @Nullable String message, @Nullable @com.linecorp.armeria.common.annotation.Nullable byte[] grpcStatusDetailsBin) Constructs anArmeriaStatusExceptionfor the given gRPC status code, message and grpcStatusDetailsBin.grpcStatusDetailsBinmay be formatted ascom.google.rpc.Statusto follow the unofficial specification. -
ArmeriaStatusException
public ArmeriaStatusException(int code, @Nullable @Nullable String message, @Nullable @Nullable Throwable cause) Constructs anArmeriaStatusExceptionfor the given gRPC status code, message and cause. -
ArmeriaStatusException
public ArmeriaStatusException(int code, @Nullable @Nullable String message, @Nullable @com.linecorp.armeria.common.annotation.Nullable byte[] grpcStatusDetailsBin, @Nullable @Nullable Throwable cause) Constructs anArmeriaStatusExceptionfor the given gRPC status code, message, grpcStatusDetailsBin and cause.grpcStatusDetailsBinmay be formatted ascom.google.rpc.Statusto follow the unofficial specification.
-
-
Method Details
-
getCode
public int getCode()Returns the gRPC status code for thisArmeriaStatusException. -
getGrpcStatusDetailsBin
@Nullable public @com.linecorp.armeria.common.annotation.Nullable byte[] getGrpcStatusDetailsBin()Returns the gRPC details binary for thisArmeriaStatusException.
-