Skip to content

Commit 8713938

Browse files
committed
fixed:have no error code export for help module
1 parent f9c2d18 commit 8713938

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Api/APIHelp_Api.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,16 @@ bool CAPIHelp_Api::APIHelp_Api_UrlStr(XCHAR* ptszKeyStr, LPCXSTR lpszUrl)
471471
XCHAR *ptszFirstStr = _tcsxchr(tszUrlStr, '/');
472472
if (ptszFirstStr == NULL)
473473
{
474+
APIHelp_IsErrorOccur = true;
475+
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_FORMAT;
474476
return false;
475477
}
476478
// 查找第二个 '/' 的位置
477479
XCHAR* ptszSecondStr = _tcsxchr(ptszFirstStr + 1, '/');
478480
if (ptszSecondStr == NULL)
479481
{
482+
APIHelp_IsErrorOccur = true;
483+
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_FORMAT;
480484
return false;
481485
}
482486
// 计算提取字符串的长度
@@ -554,6 +558,8 @@ bool CAPIHelp_Api::APIHelp_Api_WDToUrl(LPCXSTR lpszUrl, XCHAR* ptszUrl)
554558
// 确保路径以 "/" 开头
555559
if (m_StrUrl.empty() || m_StrUrl[0] != '/')
556560
{
561+
APIHelp_IsErrorOccur = true;
562+
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_FORMAT;
557563
return false;
558564
}
559565
if (0 == _tcsxnicmp("api", m_StrUrl.c_str() + 1, 3))
@@ -565,6 +571,8 @@ bool CAPIHelp_Api::APIHelp_Api_WDToUrl(LPCXSTR lpszUrl, XCHAR* ptszUrl)
565571
size_t nFirstSlash = m_StrUrl.find('/', 1);
566572
if (nFirstSlash == std::string::npos)
567573
{
574+
APIHelp_IsErrorOccur = true;
575+
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_FORMAT;
568576
return false;
569577
}
570578
//提取bucket

0 commit comments

Comments
 (0)