CCIMXDesktop
 
Loading...
Searching...
No Matches
SimpleTools.h
1#ifndef SIMPLETOOLS_H
2#define SIMPLETOOLS_H
3#include <QString>
4#include <stdexcept>
9namespace SimpleTools {
10
15class FailedReadFile : public std::runtime_error {
16public:
21 explicit FailedReadFile(const std::string& path)
22 : error("Can not process file:" + path)
23 , std::runtime_error("Failed read files") { }
28 const char* what() const noexcept {
29 return error.c_str();
30 }
31
32 const std::string error;
33};
34
41QString readQss(const QString& filePath);
42
43};
44
45#endif // SIMPLETOOLS_H
The FailedReadFile class matches the failed load qss errors.
Definition SimpleTools.h:15
FailedReadFile(const std::string &path)
FailedReadFile.
Definition SimpleTools.h:21
const std::string error
error
Definition SimpleTools.h:32
const char * what() const noexcept
what is descriptions of the exceptions
Definition SimpleTools.h:28
QString readQss(const QString &filePath)
readQss read qss from src file, this may possibly throw FailedReadFile exception
Definition SimpleTools.cpp:3