diff --git a/source/Network/Xmpp/Session.hs b/source/Network/Xmpp/Session.hs index 28be338..9070d0b 100644 --- a/source/Network/Xmpp/Session.hs +++ b/source/Network/Xmpp/Session.hs @@ -73,21 +73,20 @@ connectTcp address port hostname = do return $ Left e Right () -> return $ Right con where - -- TODO: Descriptive texts in stream errors? toError (StreamNotStreamElement _name) = XmppStreamError StreamInvalidXml Nothing Nothing toError (StreamInvalidStreamNamespace _ns) = XmppStreamError StreamInvalidNamespace Nothing Nothing toError (StreamInvalidStreamPrefix _prefix) = XmppStreamError StreamBadNamespacePrefix Nothing Nothing - -- TODO: Catch remaining xmppStartStream errors. toError (StreamWrongVersion _ver) = XmppStreamError StreamUnsupportedVersion Nothing Nothing toError (StreamWrongLangTag _) = XmppStreamError StreamInvalidXml Nothing Nothing toError StreamUnknownError = XmppStreamError StreamBadFormat Nothing Nothing - + -- TODO: Catch remaining xmppStartStream errors. + toError _ = XmppStreamError StreamBadFormat Nothing Nothing sessionXML :: Element sessionXML = pickleElem