获取 Poco 返回的错误代码的文本

Get text for error code returned by Poco?

本文关键字:错误代码 文本 返回 Poco 获取      更新时间:2023-10-16

我有一个带有Poco模块的应用程序,用于互联网连接,以支持使用传统XP和Vista OS连接TLS1.2的用户。有一个连接问题返回 Poco 错误代码,但我不知道这意味着什么。以下是日志记录输出的一部分:

poco_connection::end_receiving_response_body entered
poco_connection::close entered
poco_session::destroy_connection entered
poco_connection::end_transaction entered (code 0x00280166, hresult 0x00000000, closing: FALSE)
--------- 043d7450 (Closing request)
poco_connection::transaction_notify entered (code 0x00280166, hresult 0x00000000): Status: 3
Poco Communication Failed: code 0x00280166, hresult 0x00000000
poco_connection::~poco_connection entered

一些研究表明,有一个类Poco::Error包含一个方法

static std::string getMessage( 整型错误代码);

返回错误的文本字符串。 不幸的是,我没有 Poco 模块的来源,所以我无法添加该翻译调用。

由于 Poco 是一个开源项目,任何人都可以指出我可以查找 Poco 错误映射的代码位置吗? 特别是错误代码0x00280166

看来我很幸运,有点谷歌搜索

https://github.com/pocoproject/poco/blob/develop/Foundation/src/Error.cpp

但我不认为你很幸运,代码只是假设错误代码是Windows系统错误代码。当我谷歌0x00280166这个页面是唯一的点击。