Errors.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: Errors.h
  24. //-----------------------------------------------------------------------------
  25. //
  26. // Westwood Studios Pacific.
  27. //
  28. // Confidential Information
  29. // Copyright (C) 2001 - All Rights Reserved
  30. //
  31. //-----------------------------------------------------------------------------
  32. //
  33. // Project: RTS3
  34. //
  35. // File name: Errors.h
  36. //
  37. // Created: Steven Johnson, August 2001
  38. //
  39. // Desc: Error codes
  40. //
  41. //-----------------------------------------------------------------------------
  42. ///////////////////////////////////////////////////////////////////////////////
  43. #pragma once
  44. #ifndef __ERRORS_H_
  45. #define __ERRORS_H_
  46. /**
  47. An ErrorCode is the repository for failure modes. In almost all situations,
  48. these values will be THROWN, not returned as error codes. Feel free
  49. to add to this list as necessary; however, there should generally be very
  50. few codes needed.
  51. */
  52. enum ErrorCode
  53. {
  54. ERROR_BASE = 0xdead0001, // a nice, distinctive value
  55. ERROR_BUG = (ERROR_BASE + 0x0000), ///< should not be possible under normal operation
  56. ERROR_OUT_OF_MEMORY = (ERROR_BASE + 0x0001), ///< unable to allocate memory.
  57. ERROR_BAD_ARG = (ERROR_BASE + 0x0002), ///< generic "bad argument".
  58. ERROR_INVALID_FILE_VERSION = (ERROR_BASE + 0x0003), ///< Unrecognized file version.
  59. ERROR_CORRUPT_FILE_FORMAT = (ERROR_BASE + 0x0004), ///< Invalid file format.
  60. ERROR_BAD_INI = (ERROR_BASE + 0x0005), ///< Bad INI data.
  61. ERROR_INVALID_D3D = (ERROR_BASE + 0x0006), ///< Error initing D3D
  62. ERROR_LAST
  63. };
  64. #endif // __ERRORS_H_