Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

  1. /***
  2. *except.hpp - Declaration of CSysException class for NT kernel mode
  3. *
  4. * Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Implementation of kernel mode default exception
  8. *
  9. * Entry points:
  10. * CException
  11. *
  12. *Revision History:
  13. * 04-21-95 DAK Module created
  14. *
  15. ****/
  16. #ifndef _INC_CSYSEXCEPT_KERNEL_
  17. #define _INC_CSYSEXCEPT_KERNEL_
  18. //+---------------------------------------------------------------------------
  19. //
  20. // Class: CException
  21. //
  22. // Purpose: All exception objects (e.g. objects that are THROW)
  23. // inherit from CException.
  24. //
  25. // History: 21-Apr-95 DwightKr Created.
  26. //
  27. //----------------------------------------------------------------------------
  28. class CException
  29. {
  30. public:
  31. CException(long lError) : _lError(lError), _dbgInfo(0) {}
  32. long GetErrorCode() { return _lError;}
  33. void SetInfo(unsigned dbgInfo) { _dbgInfo = dbgInfo; }
  34. unsigned long GetInfo(void) const { return _dbgInfo; }
  35. protected:
  36. long _lError;
  37. unsigned long _dbgInfo;
  38. };
  39. #endif // _INC_CSYSEXCEPT_KERNEL_