Mon, 21 Mar 2016 16:06:14 +0100
clix.roster: Print error resplies
clix/roster.lua | file | annotate | diff | comparison | revisions |
--- a/clix/roster.lua Mon Sep 08 12:20:24 2014 +0200 +++ b/clix/roster.lua Mon Mar 21 16:06:14 2016 +0100 @@ -1,6 +1,14 @@ short_opts.i = "interactive"; local split_jid = require "util.jid".split; -local function printor(str) return function() print(str) end end +local function printor(str) + return function(ok, err) + if ok then + print(str) + else + print(err:get_error()); + end + end +end return function (opts, arg) if opts.short_help then