blob: cf898e690f9db2b0ea82c9ccd00a173e9357d71b [file] [log] [blame]
Patrick Venture2bc23fe2018-12-13 10:16:36 -08001#pragma once
2
3#include <exception>
4#include <string>
5
Patrick Venture9b534f02018-12-13 16:10:02 -08006namespace host_tool
7{
8
Patrick Venture2bc23fe2018-12-13 10:16:36 -08009class ToolException : public std::exception
10{
11 public:
12 explicit ToolException(const std::string& message) : message(message){};
13
14 virtual const char* what() const noexcept override
15 {
16 return message.c_str();
17 }
18
19 private:
20 std::string message;
21};
Patrick Venture9b534f02018-12-13 16:10:02 -080022
23} // namespace host_tool