Tue, 11 Sep 2018 21:32:53 +0100
client: Throw scansion error on stanza timeout, to avoid traceback
scansion/objects/client.lua | file | annotate | diff | comparison | revisions |
--- a/scansion/objects/client.lua Tue Sep 11 21:25:40 2018 +0100 +++ b/scansion/objects/client.lua Tue Sep 11 21:32:53 2018 +0100 @@ -131,7 +131,8 @@ verse.add_task(client.stanza_timeout or default_stanza_timeout, function () if expected_stanza then client.log("TIMEOUT waiting for %s", expected_stanza) - error("Timed out waiting for stanza"); + local e = new_error("stanza-timeout", { text = "Timed out waiting for stanza" }); + error(e); end if expected_stanza == false then client.log("Good - no stanzas were received (expected)");