|
instance Decode SnapshotVersion where |
|
decode = do |
|
_ <- decodeListLenOf 1 |
|
ver <- decodeWord |
|
case ver of |
|
0 -> pure V0 |
|
1 -> pure V1 |
|
2 -> pure V2 |
|
_ -> fail ("Unknown snapshot format version number: " <> show ver) |
It could probably say unsupported rather than unknown and have a helpful message about it being a future version
lsm-tree/lsm-tree/src-core/Database/LSMTree/Internal/Snapshot/Codec.hs
Lines 222 to 230 in 934503f
It could probably say unsupported rather than unknown and have a helpful message about it being a future version