Class RpcApplicationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ru.pathcreator.pyc.rpc.core.exceptions.RpcException
ru.pathcreator.pyc.rpc.core.exceptions.RpcApplicationException
- All Implemented Interfaces:
Serializable
Исключение, которое server-side application code может выбросить, чтобы
вернуть caller-у structured remote error.
Exception thrown by server-side application code to return a structured remote error to the caller.
Для общих system-like значений используй RpcStatus. Для
бизнес-ошибок сервиса можно использовать custom code >= 1000.
Use RpcStatus for shared system-like semantics, or provide a
custom application code >= 1000 when the service contract defines
its own business error space.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRpcApplicationException(int statusCode, String message) Создаёт application exception с custom application code.RpcApplicationException(int statusCode, String message, Throwable cause) Создаёт application exception с custom application code и cause.RpcApplicationException(RpcStatus status, String message) Создаёт application exception с predefined status.RpcApplicationException(RpcStatus status, String message, Throwable cause) Создаёт application exception с predefined status и cause. -
Method Summary
Modifier and TypeMethodDescriptionintВозвращает числовой status code, который должен уйти remote-side.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RpcApplicationException
-
RpcApplicationException
Создаёт application exception с predefined status и cause.Creates an application exception with a predefined status and cause.
- Parameters:
status- transport/application statusmessage- human-readable error messagecause- original cause
-
RpcApplicationException
Создаёт application exception с custom application code.Creates an application exception with a custom application-defined code.
- Parameters:
statusCode- custom status code, must be>= 1000message- human-readable error message
-
RpcApplicationException
Создаёт application exception с custom application code и cause.Creates an application exception with a custom application-defined code and cause.
- Parameters:
statusCode- custom status code, must be>= 1000message- human-readable error messagecause- original cause
-
-
Method Details
-
statusCode
public int statusCode()Возвращает числовой status code, который должен уйти remote-side.Returns the numeric status code that should be propagated remotely.
- Returns:
- numeric remote status code
-