0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 15:30:52 +01:00

ircd:Ⓜ️:error: Improve construction stack.

This commit is contained in:
Jason Volk 2019-07-11 17:22:16 -07:00
parent 628766f6fa
commit c4e5d06d91
2 changed files with 13 additions and 13 deletions

View file

@ -34,7 +34,7 @@ class ircd::m::error
static thread_local char fmtbuf[4_KiB];
IRCD_OVERLOAD(internal)
error(internal_t, const http::code &, const json::strung &object);
error(internal_t, const http::code &, std::string object);
protected:
IRCD_OVERLOAD(child)

View file

@ -5203,23 +5203,23 @@ ircd::m::error::fmtbuf
//
ircd::m::error::error()
:http::error
:error
{
http::INTERNAL_SERVER_ERROR
internal, http::INTERNAL_SERVER_ERROR, std::string{},
}
{}
ircd::m::error::error(std::string c)
:http::error
:error
{
http::INTERNAL_SERVER_ERROR, std::move(c)
internal, http::INTERNAL_SERVER_ERROR, std::move(c),
}
{}
ircd::m::error::error(const http::code &c)
:http::error
:error
{
c, std::string{}
internal, c, std::string{},
}
{}
@ -5227,7 +5227,7 @@ ircd::m::error::error(const http::code &c,
const json::members &members)
:error
{
internal, c, json::strung{members}
internal, c, json::strung{members},
}
{}
@ -5235,24 +5235,24 @@ ircd::m::error::error(const http::code &c,
const json::iov &iov)
:error
{
internal, c, json::strung{iov}
internal, c, json::strung{iov},
}
{}
ircd::m::error::error(const http::code &c,
const json::object &object)
:http::error
:error
{
c, std::string{object}, vector_view<const http::header>{_error_headers}
internal, c, json::strung{object},
}
{}
ircd::m::error::error(internal_t,
const http::code &c,
const json::strung &object)
std::string object)
:http::error
{
c, object, vector_view<const http::header>{_error_headers}
c, std::move(object), vector_view<const http::header>{_error_headers}
}
{}