You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
432 B
25 lines
432 B
3 years ago
|
#ifndef SERIALPORTEXCEPTION_H
|
||
|
#define SERIALPORTEXCEPTION_H
|
||
|
#include <QDebug>
|
||
|
#include <QString>
|
||
|
|
||
|
class serialPortException : public std::exception
|
||
|
{
|
||
|
private:
|
||
|
QString _str;
|
||
|
public:
|
||
|
serialPortException(QString str)
|
||
|
{
|
||
|
_str = str;
|
||
3 years ago
|
qDebug() << "errror" <<_str ;
|
||
3 years ago
|
}
|
||
|
|
||
|
virtual const char* what() const throw()
|
||
|
{
|
||
|
|
||
|
return _str.toStdString().c_str();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
#endif // SERIALPORTEXCEPTION_H
|