Interface TarantoolErrorFactory
-
- All Known Implementing Classes:
TarantoolErrors.TarantoolBoxErrorFactory,TarantoolErrors.TarantoolErrorsErrorFactory,TarantoolErrors.TarantoolUnrecognizedErrorFactory
public interface TarantoolErrorFactoryA factory that accepts an error and returns aTarantoolExceptionif this error matches the format of the factory. This is essentially a factory and a chain of responsibility.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
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.- Parameters:
error- error received from Tarantool- Returns:
- an
Optional, If the format is appropriate, then Optional will not be null
-
-