Class TarantoolErrors.TarantoolBoxErrorFactory
- java.lang.Object
-
- io.tarantool.driver.exceptions.errors.TarantoolErrors.TarantoolBoxErrorFactory
-
- All Implemented Interfaces:
TarantoolErrorFactory
- Enclosing class:
- TarantoolErrors
public static class TarantoolErrors.TarantoolBoxErrorFactory extends Object implements TarantoolErrorFactory
ProducesTarantoolInternalException
subclasses from the serialized representation in the format ofbox.error:unpack
,- See Also:
- box_error
-
-
Constructor Summary
Constructors Constructor Description TarantoolBoxErrorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TarantoolException
create(TarantoolErrorResult error)
Optional<TarantoolException>
create(org.msgpack.value.Value error)
Parse the serialized error object and if it matches any of the familiar formats, produce and return a corresponding exception, or an emptyOptional
otherwise.
-
-
-
Method Detail
-
create
public Optional<TarantoolException> create(org.msgpack.value.Value error)
Description copied from interface:TarantoolErrorFactory
Parse the serialized error object and if it matches any of the familiar formats, produce and return a corresponding exception, or an emptyOptional
otherwise.- Specified by:
create
in interfaceTarantoolErrorFactory
- Parameters:
error
- error received from Tarantool- Returns:
- an
Optional
, If the format is appropriate, then Optional will not be null
-
create
public TarantoolException create(TarantoolErrorResult error)
-
-