blob: fd1f0322df01e2fe02540d9e08127470c766a426 [file] [log] [blame]
Patrick Venture035bbbb2018-12-12 14:59:52 -08001#pragma once
2
3#include <exception>
4#include <sstream>
5#include <string>
6
7class IpmiException : public std::exception
8{
9 public:
10 explicit IpmiException(int cc)
11 {
12 std::ostringstream smessage;
13 smessage << "Received IPMI_CC: " << cc;
14 message = smessage.str();
15 }
16
17 virtual const char* what() const noexcept override
18 {
19 return message.c_str();
20 }
21
22 private:
23 std::string message;
24};