exception handling

This commit is contained in:
Glenn Maynard
2004-11-30 20:26:30 +00:00
parent 6f46898f69
commit 07acc3fad4
3 changed files with 92 additions and 105 deletions
+6 -6
View File
@@ -717,12 +717,12 @@ RageDisplay *CreateDisplay()
else if( sRenderer.CompareNoCase("d3d")==0 )
{
#if defined(SUPPORT_D3D)
error += "Initializing Direct3D...\n";
try {
return new RageDisplay_D3D( params );
} catch( const exception &e ) {
error += CString(e.what()) + "\n";
};
RageDisplay_D3D *pRet = new RageDisplay_D3D;
CString sError = pRet->Init( params );
if( sError == "" )
return pRet;
error += "Initializing Direct3D...\n" + sError;
delete pRet;
#endif
}
else if( sRenderer.CompareNoCase("null")==0 )