Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
/*
restinio
*/
#pragma once
#include <string>
#include <stdexcept>
#include <restinio/string_view.hpp>
namespace restinio
{
//
// exception_t
//
class exception_t
: public std::runtime_error
{
using bast_type_t = std::runtime_error;
public:
exception_t( const char * err )
: bast_type_t{ err }
{}
exception_t( const std::string & err )
: bast_type_t{ err }
{}
exception_t( string_view_t err )
: bast_type_t{ std::string{ err.data(), err.size() } }
{}
};
} /* namespace restinio */
restinio::exception_t
Exception class for all exceptions thrown by RESTinio.
Definition: exception.hpp:26
restinio::exception_t::exception_t
exception_t(const char *err)
Definition: exception.hpp:29
restinio::exception_t::exception_t
exception_t(string_view_t err)
Definition: exception.hpp:37
restinio::exception_t::exception_t
exception_t(const std::string &err)
Definition: exception.hpp:33
restinio::exception_t::bast_type_t
std::runtime_error bast_type_t
Definition: exception.hpp:27
restinio
Definition: asio_include.hpp:21
restinio::string_view_t
nonstd::string_view string_view_t
Definition: string_view.hpp:19
std
STL namespace.
string_view.hpp