本文介绍了在写入过程中写入usb和usb中的文件时处理异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在用USB写入文件,正在进行中我删除了USB。在代码中我使用fwrite写入文件。我放了一个try {} catch(...){}块来处理异常。异常没有被抓住。



我要求从USB升级固件。所以我使用fread从文件中读取一大块数据并将命令发送到模块。在阅读过程中,我删除了USB。相同的try {} catch(...){}块来处理异常。但例外情况并非被抓获



谢谢

Ajai

Hi,
i am writing to a file in USB and while in progress i removed the USB. In the code i am using fwrite to write to the file. i put a try{} catch(...){} block to handle the exception. Exception wasn''t getting caught.

i have a requirement to upgrade the firware from USB. so i am using fread to read a chunk of data from the file and sending the command to the module. While the reading is in progress, i removed the USB. Same try{} catch(...){} block to handle the exception. but the exception is not gettign caught

Thanks
Ajai

推荐答案


这篇关于在写入过程中写入usb和usb中的文件时处理异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 10:01