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
ProducesTarantoolInternalExceptionsubclasses 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 TarantoolExceptioncreate(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 emptyOptionalotherwise.
-
-
-
Method Detail
-
create
public Optional<TarantoolException> create(org.msgpack.value.Value error)
Description copied from interface:TarantoolErrorFactoryParse the serialized error object and if it matches any of the familiar formats, produce and return a corresponding exception, or an emptyOptionalotherwise.- Specified by:
createin 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)
-
-