blob: 889b98a34588edbe963ab41a444e9e9828e484b2 [file] [log] [blame]
Patrick Venturec404b3e2018-10-30 14:17:49 -07001#pragma once
2
3#include <exception>
4#include <string>
5
6class SensorBuildException : public std::exception
7{
8 public:
Patrick Venture83a2c3b2020-08-03 11:19:28 -07009 explicit SensorBuildException(const std::string& message) : message(message)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070010 {}
Patrick Venturec404b3e2018-10-30 14:17:49 -070011
12 virtual const char* what() const noexcept override
13 {
14 return message.c_str();
15 }
16
17 private:
18 std::string message;
19};
James Feist734f9532018-11-15 12:13:18 -080020
21class ControllerBuildException : public std::exception
22{
23 public:
Patrick Venture83a2c3b2020-08-03 11:19:28 -070024 explicit ControllerBuildException(const std::string& message) :
25 message(message)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070026 {}
James Feist734f9532018-11-15 12:13:18 -080027
28 virtual const char* what() const noexcept override
29 {
30 return message.c_str();
31 }
32
33 private:
34 std::string message;
35};
Patrick Venture81cef912019-02-11 11:57:25 -080036
37class ConfigurationException : public std::exception
38{
39 public:
Patrick Venture83a2c3b2020-08-03 11:19:28 -070040 explicit ConfigurationException(const std::string& message) :
41 message(message)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070042 {}
Patrick Venture81cef912019-02-11 11:57:25 -080043
44 virtual const char* what() const noexcept override
45 {
46 return message.c_str();
47 }
48
49 private:
50 std::string message;
51};