RESTinio
exception.hpp
Go to the documentation of this file.
1/*
2 restinio
3*/
4
9#pragma once
10
11#include <string>
12#include <stdexcept>
13
15
16namespace restinio
17{
18
19//
20// exception_t
21//
22
25 : public std::runtime_error
26{
27 using bast_type_t = std::runtime_error;
28 public:
29 exception_t( const char * err )
30 : bast_type_t{ err }
31 {}
32
33 exception_t( const std::string & err )
34 : bast_type_t{ err }
35 {}
36
38 : bast_type_t{ std::string{ err.data(), err.size() } }
39 {}
40};
41
42} /* namespace restinio */
Exception class for all exceptions thrown by RESTinio.
Definition: exception.hpp:26
exception_t(const char *err)
Definition: exception.hpp:29
exception_t(string_view_t err)
Definition: exception.hpp:37
exception_t(const std::string &err)
Definition: exception.hpp:33
std::runtime_error bast_type_t
Definition: exception.hpp:27
nonstd::string_view string_view_t
Definition: string_view.hpp:19
STL namespace.