例子 8.2 extern char pFile Name: TRY CFile f( pFile Name, CFile: mode Create CFile: modeWrite CATCH( CFileEXception e if(e->m cause = CFile EXception fileNotFound printf(" ERROR: File not found\n") else if( e->m cause ==CFileEXception diskFull) printf("ERROR: Disk full\n") else if(e->m cause = CFile EXception: endofFile) printf( "ERROR: End Of FileIn) END CATCH例子 8.2 extern char* pFileName; TRY { CFile f( pFileName, CFile::modeCreate | CFile::modeWrite ); } CATCH( CFileException e ) { if( e->m_cause == CFileException::fileNotFound ) printf( "ERROR: File not found\n"); else if( e->m_cause == CFileException:: diskFull) printf( "ERROR: Disk full\n"); else if( e->m_cause == CFileException:: endOfFile) printf( "ERROR: End Of File\n"); } END_CATCH