module Database.Persist.Redis.Exception ( RedisException (..) ) where import Control.Exception (Exception) data RedisException = NotSupportedOperation String | ParserError String | NotSupportedValueType String | IncorrectUpdate String | IncorrectBehavior instance Show RedisException where show :: RedisException -> String show (NotSupportedOperation String key) = String "The operation is not supported: " String -> ShowS forall a. [a] -> [a] -> [a] ++ String key show (ParserError String msg) = String "Error during parsing: " String -> ShowS forall a. [a] -> [a] -> [a] ++ String msg show (NotSupportedValueType String tp) = String "The value type " String -> ShowS forall a. [a] -> [a] -> [a] ++ String tp String -> ShowS forall a. [a] -> [a] -> [a] ++ String " is not supported for Redis" show RedisException IncorrectBehavior = String "The behavior of persistent-redis is incorrect" show (IncorrectUpdate String msg) = String "This update is not possible: " String -> ShowS forall a. [a] -> [a] -> [a] ++ String msg instance Exception RedisException