generated from Sithas/conan_template
мелкие правки
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
#include "exception400_bad_request.h"
|
||||
|
||||
#include <boost/beast/core/error.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace std::literals;
|
||||
|
||||
namespace uad
|
||||
{
|
||||
exception400_bad_request::exception400_bad_request(const string& info): message_(info)
|
||||
{
|
||||
}
|
||||
|
||||
char const* exception400_bad_request::what() const
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace uad
|
||||
{
|
||||
struct exception400_bad_request : std::exception
|
||||
{
|
||||
private:
|
||||
std::string message_;
|
||||
public:
|
||||
exception400_bad_request(const std::string& info);
|
||||
char const* what() const override;
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#include "exception409_conflict.h"
|
||||
|
||||
#include <boost/beast/core/error.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace std::literals;
|
||||
|
||||
namespace uad
|
||||
{
|
||||
exception409_conflict::exception409_conflict(const string& info): message_(info)
|
||||
{
|
||||
}
|
||||
|
||||
char const* exception409_conflict::what() const
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace uad
|
||||
{
|
||||
struct exception409_conflict : std::exception
|
||||
{
|
||||
private:
|
||||
std::string message_;
|
||||
public:
|
||||
exception409_conflict(const std::string& info);
|
||||
char const* what() const override;
|
||||
};
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#include "exception422_unprocessable_entity.h"
|
||||
|
||||
#include <boost/beast/core/error.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace std::literals;
|
||||
|
||||
namespace uad
|
||||
{
|
||||
exception422_unprocessable_entity::exception422_unprocessable_entity(const string& info): message_(info)
|
||||
{
|
||||
}
|
||||
|
||||
char const* exception422_unprocessable_entity::what() const
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace uad
|
||||
{
|
||||
struct exception422_unprocessable_entity : std::exception
|
||||
{
|
||||
private:
|
||||
std::string message_;
|
||||
public:
|
||||
exception422_unprocessable_entity(const std::string& info);
|
||||
char const* what() const override;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "session_exception.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace uad
|
||||
{
|
||||
char const* session_exception::what() const
|
||||
{
|
||||
return message.c_str();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/beast/http/status.hpp>
|
||||
#include <string>
|
||||
#include <boost/exception/to_string.hpp>
|
||||
|
||||
namespace uad
|
||||
{
|
||||
struct session_exception : std::exception
|
||||
{
|
||||
const boost::beast::http::status code;
|
||||
const std::string comment;
|
||||
const std::string message;
|
||||
|
||||
session_exception(const boost::beast::http::status ec, const std::string info)
|
||||
: code(ec), comment(info), message(std::to_string(static_cast<uint64_t>(ec)) + " - " + comment)
|
||||
{}
|
||||
char const* what() const override;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user