WebpagePrinterTool 2.0
Print a web page skip the browser's print preview
载入中...
搜索中...
未找到
SqliteOpError.h
浏览该文件的文档.
1#pragma once
2#include <QString>
3#include <ctime>
4#include <exception>
5#include <string>
6class SqliteOpError : public std::exception {
7
8 public:
9 explicit SqliteOpError(const QString& errorMsg) {
10 std::time_t result = std::time(nullptr);
11 auto error_time = std::asctime(std::localtime(&result));
12 this->error_msg = QString("error_msg:\n%1\nerror_time:\n%2\n")
13 .arg(errorMsg)
14 .arg(error_time)
15 .toStdString();
16 }
17
18 const char* what() const noexcept override { return error_msg.c_str(); }
19
20 private:
21 std::string error_msg;
22};
const char * what() const noexcept override
定义 SqliteOpError.h:18
SqliteOpError(const QString &errorMsg)
定义 SqliteOpError.h:9
std::string error_msg
定义 SqliteOpError.h:21