Browse Source

Allow constructing BadRequest from std::string

lmdb
Martchus 3 months ago
parent
commit
a2fbba9713
  1. 8
      librepomgr/webapi/params.h

8
librepomgr/webapi/params.h

@ -26,7 +26,8 @@ struct ServiceSetup;
namespace WebAPI {
struct LIBREPOMGR_EXPORT BadRequest : std::runtime_error {
BadRequest(const char *message);
explicit BadRequest(const char *message);
explicit BadRequest(const std::string &message);
};
inline BadRequest::BadRequest(const char *message)
@ -34,6 +35,11 @@ inline BadRequest::BadRequest(const char *message)
{
}
inline BadRequest::BadRequest(const std::string &message)
: std::runtime_error(message)
{
}
struct LIBREPOMGR_EXPORT Url {
Url(std::string_view path, std::string_view hash, std::vector<std::pair<std::string_view, std::string_view>> &&params);
Url(const Request &request);

Loading…
Cancel
Save