home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / IKLOWNS / CGEXCPT.CPP < prev    next >
C/C++ Source or Header  |  1996-08-28  |  2KB  |  85 lines

  1. /*===========================================================================*\
  2. |
  3. |  File:        cgexcpt.cpp
  4. |
  5. |  Description: 
  6. |       Exception handling code for sample games
  7. |       
  8. |-----------------------------------------------------------------------------
  9. |
  10. |  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  11. |
  12. |  Written by Moss Bay Engineering, Inc. under contract to Microsoft Corporation
  13. |
  14. \*===========================================================================*/
  15.  
  16. #include "cgres.h"
  17. #include "cgexcpt.h"
  18.  
  19. /*---------------------------------------------------------------------------*\
  20. |
  21. |       Class CGameException
  22. |
  23. |  DESCRIPTION:
  24. |       Container class for most exceptions.
  25. |
  26. |
  27. \*---------------------------------------------------------------------------*/
  28.  
  29. CGameException::CGameException(
  30.         int resID   // resource ID of information string; 0 == no message
  31.         ) : mResID( resID )
  32. {
  33.     // !!! does nothing for now
  34. }   
  35.  
  36. CGameException::~CGameException()
  37. {
  38.     
  39. }   
  40.  
  41. /*---------------------------------------------------------------------------*\
  42. |
  43. |       Class CGameStartupError
  44. |
  45. |  DESCRIPTION:
  46. |       Handles exceptions which prevent app from running
  47. |
  48. |
  49. \*---------------------------------------------------------------------------*/
  50.  
  51. CGameStartupError::CGameStartupError(
  52.         int resID   // resource ID of information string; 0 == no message
  53.         ) : CGameException(resID)
  54. {
  55.     // !!! does nothing for now
  56. }   
  57.  
  58. CGameStartupError::~CGameStartupError()
  59. {
  60.     
  61. }   
  62.  
  63. /*---------------------------------------------------------------------------*\
  64. |
  65. |       Class CGameResourceError
  66. |
  67. |  DESCRIPTION:
  68. |       Handles general out-of-resource exceptions
  69. |
  70. |
  71. \*---------------------------------------------------------------------------*/
  72.  
  73. CGameResourceError::CGameResourceError(
  74.         // may want to add a resource type parameter
  75.         ) : CGameException(0)
  76. {
  77.     // !!! may want to dump a memory ballast or some such
  78. }   
  79.  
  80. CGameResourceError::~CGameResourceError()
  81. {
  82.     
  83. }   
  84.  
  85.