gpt4 book ai didi

c++ - 未处理的异常错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:50:57 24 4
gpt4 key购买 nike

<分区>

我在 xutility 中遇到了一个未处理的异常

if (_Myproxy != 0)
{ // proxy allocated, drain it
_Lockit _Lock(_LOCK_DEBUG);

for (_Iterator_base12 **_Pnext = &_Myproxy->_Myfirstiter;
*_Pnext != 0; *_Pnext = (*_Pnext)->_Mynextiter)
(*_Pnext)->_Myproxy = 0; <------- unhandled exception here
_Myproxy->_Myfirstiter = 0;
}

我无法控制 xutility。此 未处理的异常 列车源于

std::string BinarySearchFile::readT(long filePointerLocation, long sizeOfData) 
{
try{
if(binary_search_file){
std::string data;
binary_search_file.seekp(filePointerLocation);
binary_search_file.seekg(filePointerLocation);
binary_search_file.read(reinterpret_cast<char *>(&data), sizeOfData);

return data; <------- branch into xutility and subsequent unhandled exception

}else if(binary_search_file.fail()){
throw CustomException("Attempt to read attribute error");
}

}
catch(CustomException &custom_exception){ // Using custom exception class
std::cout << custom_exception.what() << std::endl;
}

}

通常,return 会进行到

std::string BinarySearchFile::read_data(long filePointerLocation, long sizeOfData){
return readT(filePointerLocation, sizeOfData);
}

然后回到原来的调用

attributeValue = data_file->read_data(index, size);

我做错了什么?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com