Top Description Constructors Methods
io.rsocket.exceptions

public final Class Exceptions

extends Object
Class Inheritance
Static Imports
io.rsocket.frame.ErrorFrameCodec.APPLICATION_ERROR, .ErrorFrameCodec.CANCELED, .ErrorFrameCodec.CONNECTION_CLOSE, .ErrorFrameCodec.CONNECTION_ERROR, .ErrorFrameCodec.INVALID, .ErrorFrameCodec.INVALID_SETUP, .ErrorFrameCodec.MAX_USER_ALLOWED_ERROR_CODE, .ErrorFrameCodec.MIN_USER_ALLOWED_ERROR_CODE, .ErrorFrameCodec.REJECTED, .ErrorFrameCodec.REJECTED_RESUME, .ErrorFrameCodec.REJECTED_SETUP, .ErrorFrameCodec.UNSUPPORTED_SETUP

Utility class that generates an exception from a frame.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RuntimeException

Returns:

a RSocketErrorException that matches the error code in the Frame
from
(int streamId, ByteBuf
the frame to retrieve the error code and message from
frame
)

Create a RSocketErrorException from a Frame that matches the error code it contains.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Exceptionsback to summary
private Exceptions()

Method Detail

fromback to summary
public static RuntimeException from(int streamId, ByteBuf frame)

Create a RSocketErrorException from a Frame that matches the error code it contains.

Parameters
frame:ByteBuf

the frame to retrieve the error code and message from

Returns:RuntimeException

a RSocketErrorException that matches the error code in the Frame

Exceptions
NullPointerException:
if frame is null