try{
                  if (m_pArchiveOut != NULL)//这个地方老是出错~产生的异常用下面来捕捉,但是运行到这里就出错,异常无法捕捉~~~那位大哥以前遇到这种问题啊~~~~
{
pMsg->Serialize(*m_pArchiveOut);
m_pArchiveOut->Flush();
}
}
catch (CArchiveException* e)
{
e->ReportError();   
e->Delete();
if(e->m_cause == CArchiveException::endOfFile)
{
AfxMessageBox("已读到文件尾");
}
else if(e->m_cause == CArchiveException::badIndex)
{
AfxMessageBox("文件格式错");
}
else if(e->m_cause == CArchiveException::readOnly)
{
AfxMessageBox("文件只能是读");
}
else if(e->m_cause == CArchiveException::writeOnly)
{
AfxMessageBox("文件只能是写");
}
else if(e->m_cause == CArchiveException::badClass)
{
AfxMessageBox("文件只能是读");
}
else if(e->m_cause == CArchiveException::readOnly)
{
AfxMessageBox("Tried to read an object into an object of the wrong type");
}
else if(e->m_cause == CArchiveException::badSchema)
{
AfxMessageBox("Tried to read an object with a different version of the class");
}
else
AfxMessageBox("CArchiveException::generic");
}