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