Standardize Error Handling
Motivation:
RedisError
was being used in many places in an ad-hoc fashion that made it unclear as to what source of errors it exactly represents.
In addition, it doesn't follow community conventions of handling known "classes" of errors with enums rather than static struct instances.
Results:
All errors that are generated and thrown within the library are specified as either RESPDecoder.Error
or NIORedisError
.
RedisError
is simplified to represent an error message sent by a Redis instance that conforms to LocalizedError
.