Re-simplify exceptions.

This commit is contained in:
Glenn Maynard
2003-07-23 20:19:22 +00:00
parent 7cfed78e24
commit 541b21145e
2 changed files with 14 additions and 8 deletions
+13 -2
View File
@@ -1,8 +1,19 @@
#ifndef RAGEDISPLAY_D3D_H
#define RAGEDISPLAY_D3D_H
class RageException_D3DNotInstalled: public exception { };
class RageException_D3DNoAcceleration: public exception { };
class RageException_D3DNotInstalled: public exception
{
const char *what() const { return
"DirectX 8.1 or greater is not installed. You can download it from:\n"
"http://www.microsoft.com/downloads/details.aspx?FamilyID=a19bed22-0b25-4e5d-a584-6389d8a3dad0&displaylang=en"; }
};
class RageException_D3DNoAcceleration: public exception
{
const char *what() const { return
"Your system is reporting that Direct3D hardware acceleration is not available. "
"Please obtain an updated driver from your video card manufacturer.\n\n"; }
};
class RageDisplay_D3D: public RageDisplay
+1 -6
View File
@@ -407,12 +407,7 @@ RageDisplay *CreateDisplay()
error += "Initializing Direct3D...\n";
try {
return new RageDisplay_D3D( params );
} catch(RageException_D3DNotInstalled e) {
error += "DirectX 8.1 or greater is not installed. You can download it from:\n"+D3DURL+"\n\n";
} catch(RageException_D3DNoAcceleration e) {
error += "Your system is reporting that Direct3D hardware acceleration is not available. "
"Please obtain an updated driver from your video card manufacturer.\n\n";
} catch(RageException e) {
} catch( const exception &e ) {
error += CString(e.what()) + "\n";
};
#endif