# HG changeset patch # User Matthew Wild # Date 1536697973 -3600 # Node ID ce99abde467b0a3e1d22a882f2f92cb82a470a0f # Parent ff11f32d2499f2803f51106805a1e97bea103045 client: Throw scansion error on stanza timeout, to avoid traceback diff -r ff11f32d2499 -r ce99abde467b scansion/objects/client.lua --- 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)");