summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2020-11-26 15:09:42 +0300
committerdefanor <defanor@uberspace.net>2020-11-26 15:09:42 +0300
commitff1dad7ec8717a3cf4a798daff9f025964c660f5 (patch)
treec50da3e562df78da47ae493e7026f4e5f5e55321 /examples
parent1e242aaf63f40dc3b6f9447e5f677f4e7d60bccc (diff)
Introduce rexmpp_strerror
Diffstat (limited to 'examples')
-rw-r--r--examples/basic.c2
-rw-r--r--examples/weechat.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/basic.c b/examples/basic.c
index 1d19c90..cd3d6e3 100644
--- a/examples/basic.c
+++ b/examples/basic.c
@@ -160,7 +160,7 @@ main (int argc, char **argv) {
break;
}
if (err != REXMPP_E_AGAIN) {
- puts("error");
+ printf("error: %s\n", rexmpp_strerror(err));
break;
}
/* Could inspect the state here. */
diff --git a/examples/weechat.c b/examples/weechat.c
index 29a592a..1fa4e57 100644
--- a/examples/weechat.c
+++ b/examples/weechat.c
@@ -432,7 +432,7 @@ void iter (struct weechat_rexmpp *wr, fd_set *rfds, fd_set *wfds) {
return;
}
if (err != REXMPP_E_AGAIN) {
- weechat_printf(wr->server_buffer, "rexmpp error");
+ weechat_printf(wr->server_buffer, "rexmpp error: %s", rexmpp_strerror(err));
return;
}
fd_set read_fds, write_fds;