00001
00002
00003
00004
00005
00006
00007
00008 using System;
00009 using System.Collections;
00010 using Microsoft.DirectX;
00011 using Microsoft.DirectX.Direct3D;
00012
00013 namespace Microsoft.Samples.DirectX.UtilityToolkit
00014 {
00016 public class DirectXSampleException : System.ApplicationException
00017 {
00018 public DirectXSampleException(string message) : base(message) { }
00019 public DirectXSampleException(string message, Exception inner) : base(message, inner) { }
00020 }
00021
00025 public class NoDirect3DException : DirectXSampleException
00026 {
00027 public NoDirect3DException() : base("Could not initialize Direct3D. You may want to check that the latest version of DirectX is correctly installed on your system.") { }
00028 public NoDirect3DException(Exception inner) : base("Could not initialize Direct3D. You may want to check that the latest version of DirectX is correctly installed on your system.", inner) { }
00029 }
00033 public class NoCompatibleDevicesException : DirectXSampleException
00034 {
00035 public NoCompatibleDevicesException() : base("Could not find any compatible Direct3D devices.") { }
00036 public NoCompatibleDevicesException(Exception inner) : base("Could not find any compatible Direct3D devices.", inner) { }
00037 }
00041 public class MediaNotFoundException : DirectXSampleException
00042 {
00043 public MediaNotFoundException() : base("Could not find required media. Ensure that the DirectX SDK is correctly installed.") { }
00044 public MediaNotFoundException(Exception inner) : base("Could not find required media. Ensure that the DirectX SDK is correctly installed.", inner) { }
00045 }
00049 public class CreatingDeviceException : DirectXSampleException
00050 {
00051 public CreatingDeviceException() : base("Failed creating the Direct3D device.") { }
00052 public CreatingDeviceException(Exception inner) : base("Failed creating the Direct3D device.", inner) { }
00053 }
00057 public class ResettingDeviceException : DirectXSampleException
00058 {
00059 public ResettingDeviceException() : base("Failed resetting the Direct3D device.") { }
00060 public ResettingDeviceException(Exception inner) : base("Failed resetting the Direct3D device.", inner) { }
00061 }
00065 public class CreatingDeviceObjectsException : DirectXSampleException
00066 {
00067 public CreatingDeviceObjectsException() : base("Failed creating Direct3D device objects.") { }
00068 public CreatingDeviceObjectsException(Exception inner) : base("Failed creating Direct3D device objects.", inner) { }
00069 }
00073 public class ResettingDeviceObjectsException : DirectXSampleException
00074 {
00075 public ResettingDeviceObjectsException() : base("Failed resetting Direct3D device objects.") { }
00076 public ResettingDeviceObjectsException(Exception inner) : base("Failed resetting Direct3D device objects.", inner) { }
00077 }
00078 }