Prompt Tools 0.3.2
Loading...
Searching...
No Matches
exceptions.hpp
Go to the documentation of this file.
1#pragma once
2#include <exception>
3#include <string>
4
5namespace prompt
6{
7
8 // provider exception class
9class PromptException : public std::exception
10{
11public:
12 PromptException(const std::string& msg) : msg_(msg)
13 {
14 }
15
16 virtual const char* what() const noexcept override
17 {
18 return msg_.c_str();
19 }
20
21private:
22 std::string msg_;
23};
24
25}
Definition exceptions.hpp:10
virtual const char * what() const noexcept override
Definition exceptions.hpp:16
std::string msg_
Definition exceptions.hpp:22
PromptException(const std::string &msg)
Definition exceptions.hpp:12
Definition base_class.hpp:8