mirror of
https://github.com/Lemonochrme/clover.git
synced 2025-06-08 08:40:50 +02:00
22 lines
No EOL
498 B
C++
22 lines
No EOL
498 B
C++
#ifndef _HEADER_SERVER_EXCEPTION
|
|
#define _HEADER_SERVER_EXCEPTION
|
|
#include <Arduino.h>
|
|
#include <exception>
|
|
#include "ServerException.hpp"
|
|
|
|
class ServerException : public std::exception
|
|
{
|
|
public:
|
|
ServerException(const char* msg, uint8_t code)
|
|
: _msg(msg), _code(code)
|
|
{
|
|
}
|
|
|
|
uint8_t code() { return _code; }
|
|
const char* what() { return _msg; }
|
|
private:
|
|
const char* _msg;
|
|
uint8_t _code;
|
|
};
|
|
|
|
#endif // _HEADER_SERVER_EXCEPTION
|