generated from Sithas/conan_template
Добавлены структуры исключений
This commit is contained in:
@@ -52,6 +52,8 @@ add_executable(App ./src/main.cpp
|
||||
./src/exceptions/exception400_bad_request.h
|
||||
./src/exceptions/exception409_conflict.cpp
|
||||
./src/exceptions/exception409_conflict.h
|
||||
./src/exceptions/exception422_unprocessable_entity.cpp
|
||||
./src/exceptions/exception422_unprocessable_entity.h
|
||||
)
|
||||
|
||||
target_link_libraries(App PRIVATE Boost::boost Boost::json Threads::Threads mysql::concpp)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user