Class TarantoolErrorsParser
- java.lang.Object
-
- io.tarantool.driver.exceptions.errors.TarantoolErrorsParser
-
public final class TarantoolErrorsParser extends Object
A parser that pushes the error into different types of tarantool errors and looks at which one fits, if none fits, then at the end there will be a stub error. This is essentially the implementation of the Chain of Command pattern. As a result, an exception of the desired type and with the desired message is thrown.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TarantoolException
parse(org.msgpack.value.Value error)
Parse the error from tarantool
-
-
-
Method Detail
-
parse
public static TarantoolException parse(org.msgpack.value.Value error)
Parse the error from tarantool- Parameters:
error
- error received from Tarantool- Returns:
- an exception of the special type and with the special message is thrown
- Throws:
TarantoolClientException
- if the error message conversion cannot be performed
-
-