本页内容

Utils::ResultError Class

class Utils::ResultError

ResultError 类用于从函数中返回包含错误消息的错误,供用户查看。更多内容...

Header: #include <ResultError>

公共函数

ResultError(const QString &errorMessage)
ResultError(Utils::ResultSpecialErrorCode code, const QString &errorMessage = {})

详细说明

除了一个带错误消息字符串的便捷构造函数外,该类还通过Utils::ResultSpecialErrorCode 枚举为内部错误提供了标准化的错误消息。

另请参阅 Utils::Result 和Utils::ResultSpecialErrorCode 。

成员函数文档

[explicit] ResultError::ResultError(const QString &errorMessage)

为用户创建一个包含指定errorMessage 的错误。

ResultError::ResultError(Utils::ResultSpecialErrorCode code, const QString &errorMessage = {})

生成一条带有标准化错误信息的错误。使用 `errorMessage ` 提供有关该错误的更多详细信息。

另请参阅 Utils::ResultSpecialErrorCode 。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.