home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / Gradient / CGradientError.cp < prev    next >
Encoding:
Text File  |  1996-12-20  |  984 b   |  51 lines  |  [TEXT/CWIE]

  1. #include "ocheaders.h"
  2. #include "CBaseControl.h"
  3. #include "CErrorControl.h"
  4. #include "CGradientControl.h"
  5. #include "CError.h"
  6. #include "CGradientError.h"
  7. #include "FnAssert.h"
  8. #include "BDUtils.h"
  9.  
  10. #define MControl ((CGradientControl *)mControl)
  11.  
  12. ///////////////////////////////////////////////////////////////////////////////
  13. //
  14. // CGradientError::CGradientError
  15. //
  16.  
  17. CGradientError::CGradientError(ErrorCode error) : CError(error)
  18. {
  19. }
  20.  
  21. CGradientError::CGradientError(ErrorCode error, CErrorControl * control)
  22.     : CError(error, control)
  23. {
  24. }
  25.  
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // CGradientError::HandleError
  29. //
  30.  
  31. void CGradientError::HandleError(void)
  32. {
  33.     switch (mErrorCode)
  34.     {
  35.         case CONTROL_GWORLD_ALLOCATION_ERROR:
  36.         {
  37.             ASSERT(0, "The Gradient control gworld could not be allocated!");
  38.             break;
  39.         }
  40.  
  41.         case GWORLD_ALLOCATION_ERROR:
  42.         {
  43.             ASSERT(0, "A gworld could not be allocated!");
  44.             break;
  45.         }
  46.                     
  47.         default:
  48.             break;
  49.     }
  50. }
  51.