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 / CError.cp next >
Encoding:
Text File  |  1996-12-20  |  1.1 KB  |  54 lines  |  [TEXT/CWIE]

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. //    This file is a BDIAMOND addition.
  4. //
  5.  
  6. #include "ocheaders.h"
  7. #include "FnAssert.h"
  8. #include "CError.h"
  9.  
  10. ///////////////////////////////////////////////////////////////////////////////
  11. //
  12. // CError::CError
  13. //
  14.  
  15. CError::CError(ErrorCode error)
  16. {
  17.     this->Init(error);
  18. }
  19.  
  20. CError::CError(ErrorCode error, CErrorControl * control)
  21. {
  22.     this->Init(error, control);
  23. }
  24.  
  25. ///////////////////////////////////////////////////////////////////////////////
  26. //
  27. // CError::Init
  28. //
  29. void CError::Init(ErrorCode error, CErrorControl * control)
  30. {
  31.     // just a little init function that all the contructors call.  Mostly
  32.     // to make it easier to set a breakpoint in the debugger upon an error.
  33.     mErrorCode         = error;
  34.     mControl         = control;
  35. }
  36.  
  37. ///////////////////////////////////////////////////////////////////////////////
  38. //
  39. // CError::HandleError
  40. //
  41.  
  42. void CError::HandleError(void)
  43. {
  44.     switch ( mErrorCode )
  45.     {
  46.         case FAILED_ASSERTION_ERROR:
  47.             throw;  // just cause a termination
  48.             break;
  49.             
  50.         default:
  51.             break;
  52.     }
  53. }
  54.