Interface TarantoolErrorFactory
-
- All Known Implementing Classes:
TarantoolErrors.TarantoolBoxErrorFactory
,TarantoolErrors.TarantoolErrorsErrorFactory
,TarantoolErrors.TarantoolUnrecognizedErrorFactory
public interface TarantoolErrorFactory
A factory that accepts an error and returns aTarantoolException
if 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 emptyOptional
otherwise.
-
-
-
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 emptyOptional
otherwise.- Parameters:
error
- error received from Tarantool- Returns:
- an
Optional
, If the format is appropriate, then Optional will not be null
-
-