0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 14:08:56 +02:00

modules/net_dns: More catch block.

This commit is contained in:
Jason Volk 2019-07-09 01:38:53 -07:00
parent ab25346534
commit 6b16bdd76c

View file

@ -480,6 +480,29 @@ try
send(room_id, m::me, type, state_key, json::object(out.completed()));
return true;
}
catch(const http::error &e)
{
log::error
{
log, "cache put (%s, %s) code:%u (%s) :%s %s",
type,
state_key,
code,
msg,
e.what(),
e.content,
};
const json::value error_value
{
json::object{e.content}
};
const json::value error_records{&error_value, 1};
const json::strung error{error_records};
call_waiters(type, state_key, error);
return false;
}
catch(const std::exception &e)
{
log::error
@ -580,6 +603,28 @@ try
send(room_id, m::me, type, state_key, json::object{out.completed()});
return true;
}
catch(const http::error &e)
{
log::error
{
log, "cache put (%s, %s) rrs:%zu :%s %s",
type,
state_key,
rrs.size(),
e.what(),
e.content,
};
const json::value error_value
{
json::object{e.content}
};
const json::value error_records{&error_value, 1};
const json::strung error{error_records};
call_waiters(type, state_key, error);
return false;
}
catch(const std::exception &e)
{
log::error