电梯检验员是公务员吗:网络出问题的时候怎么处理?

来源:百度文库 编辑:高考问答 时间:2024/05/15 04:07:05
我用MFC编程的时候用到CInternetSession。如果网络出了问题,比如断网了,代理服务器没有反应了,就会提示出错:
void AFXAPI AfxThrowInternetException(DWORD_PTR dwContext, DWORD dwError /* = 0 */)
{
if (dwError == 0)
dwError = ::GetLastError();

CInternetException* pException = new CInternetException(dwError);
pException->m_dwContext = dwContext;

TRACE(traceInternet, 0, "Warning: throwing CInternetException for error %d\n", dwError);
THROW(pException);
}
到这里程序自动退出了。
这样的网络故障在程序中怎么处理?