Allow constructing BadRequest from std::string
This commit is contained in:
parent
b5ca815e4c
commit
a2fbba9713
|
@ -26,7 +26,8 @@ struct ServiceSetup;
|
||||||
namespace WebAPI {
|
namespace WebAPI {
|
||||||
|
|
||||||
struct LIBREPOMGR_EXPORT BadRequest : std::runtime_error {
|
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)
|
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 {
|
struct LIBREPOMGR_EXPORT Url {
|
||||||
Url(std::string_view path, std::string_view hash, std::vector<std::pair<std::string_view, std::string_view>> &¶ms);
|
Url(std::string_view path, std::string_view hash, std::vector<std::pair<std::string_view, std::string_view>> &¶ms);
|
||||||
Url(const Request &request);
|
Url(const Request &request);
|
||||||
|
|
Loading…
Reference in New Issue