Hedis exports only 1 exception, but it seems to me that is unfortunately quite unwelcome. The problem is that thanks to unsafeInterleaveIO the exception can occur anywhere. Which would still be somewhat managable in the IO monad, but I need to use it on top of a transformer stack and catching IO exceptions there is really tricky. I ended up threading all calls through evaluate but that defies the purpose of optimal pipelining. (given the workflow I have no benefit from that anyway).
Throwing exceptions 'anywhere' doesn't seem to me a good design. Is there a way to not throw the exceptions? I.e. catch the exceptions somewhere during the communication and return Left/TxError instead? This would be nice haskellish design decision anyway.
Hedis exports only 1 exception, but it seems to me that is unfortunately quite unwelcome. The problem is that thanks to
unsafeInterleaveIO
the exception can occur anywhere. Which would still be somewhat managable in the IO monad, but I need to use it on top of a transformer stack and catching IO exceptions there is really tricky. I ended up threading all calls throughevaluate
but that defies the purpose of optimal pipelining. (given the workflow I have no benefit from that anyway).Throwing exceptions 'anywhere' doesn't seem to me a good design. Is there a way to not throw the exceptions? I.e. catch the exceptions somewhere during the communication and return Left/TxError instead? This would be nice haskellish design decision anyway.