Re-simplify exceptions.
This commit is contained in:
@@ -1,8 +1,19 @@
|
|||||||
#ifndef RAGEDISPLAY_D3D_H
|
#ifndef RAGEDISPLAY_D3D_H
|
||||||
#define RAGEDISPLAY_D3D_H
|
#define RAGEDISPLAY_D3D_H
|
||||||
|
|
||||||
class RageException_D3DNotInstalled: public exception { };
|
class RageException_D3DNotInstalled: public exception
|
||||||
class RageException_D3DNoAcceleration: 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
|
class RageDisplay_D3D: public RageDisplay
|
||||||
|
|||||||
@@ -407,12 +407,7 @@ RageDisplay *CreateDisplay()
|
|||||||
error += "Initializing Direct3D...\n";
|
error += "Initializing Direct3D...\n";
|
||||||
try {
|
try {
|
||||||
return new RageDisplay_D3D( params );
|
return new RageDisplay_D3D( params );
|
||||||
} catch(RageException_D3DNotInstalled e) {
|
} catch( const exception &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) {
|
|
||||||
error += CString(e.what()) + "\n";
|
error += CString(e.what()) + "\n";
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user