data SessionException = TimeoutException
| UnexpectedMessageException String FromServerMessage
+ | ReplayOutOfOrderException FromServerMessage [FromServerMessage]
instance Exception SessionException
"Received an unexpected message from the server:\n" ++
"Expected: " ++ expected ++ "\n" ++
"Last message accepted: " ++ show lastMsg
+ show (ReplayOutOfOrderException received expected) =
+ "Replay is out of order:\n" ++
+ "Received from server:" ++ show received ++ "\n" ++
+ "Expected one of: " ++ concatMap show expected
anySessionException :: SessionException -> Bool
anySessionException = const True
\ No newline at end of file