aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core/stanza_reader.vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/core/stanza_reader.vala')
-rw-r--r--xmpp-vala/src/core/stanza_reader.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmpp-vala/src/core/stanza_reader.vala b/xmpp-vala/src/core/stanza_reader.vala
index 4b4d98ab..6a7520ba 100644
--- a/xmpp-vala/src/core/stanza_reader.vala
+++ b/xmpp-vala/src/core/stanza_reader.vala
@@ -7,12 +7,12 @@ public const string XML_URI = "http://www.w3.org/XML/1998/namespace";
public const string JABBER_URI = "jabber:client";
public errordomain XmlError {
- XML_ERROR,
NS_DICT_ERROR,
UNSUPPORTED,
EOF,
BAD_XML,
- IO_ERROR
+ IO,
+ TLS
}
public class StanzaReader {
@@ -52,8 +52,10 @@ public class StanzaReader {
buffer_fill = (int) yield ((!)input).read_async(buffer, GLib.Priority.DEFAULT, cancellable);
if (buffer_fill == 0) throw new XmlError.EOF("End of input stream reached.");
buffer_pos = 0;
+ } catch (TlsError e) {
+ throw new XmlError.TLS("TlsError: %s".printf(e.message));
} catch (GLib.IOError e) {
- throw new XmlError.IO_ERROR("IOError in GLib: %s".printf(e.message));
+ throw new XmlError.IO("GLib.IOError: %s".printf(e.message));
}
}