TouchCPLib
1.0.0
A touch-enabled GUI interface based on SDL and libTS. It provides a simple desktop-free UI for your embedded Raspberry projects.
TouchInputException.h
Go to the documentation of this file.
1
#pragma once
2
13
#include <exception>
14
#include <string>
15
#include <stdarg.h>
16
17
class
TouchInputException
:
public
std::exception
18
{
19
public
:
20
TouchInputException
(
const
std::string &message) : msg(message){};
21
TouchInputException
(
const
char
*message, ...)
22
{
23
char
msg_buf[300];
24
va_list args;
25
va_start(args, message);
26
vsnprintf(msg_buf, 300, message, args);
27
va_end(args);
28
msg = std::string(msg_buf);
29
};
30
const
char
*
what
() const noexcept
override
31
{
32
return
msg.c_str();
33
}
34
35
private
:
36
std::string msg;
37
};
TouchInputException
Definition:
TouchInputException.h:17
TouchInputException::what
const char * what() const noexcept override
Definition:
TouchInputException.h:30
TouchInputException::TouchInputException
TouchInputException(const std::string &message)
Definition:
TouchInputException.h:20
TouchInputException::TouchInputException
TouchInputException(const char *message,...)
Definition:
TouchInputException.h:21
include
TouchCP
TouchInputException.h
Generated by
1.8.13