Leaked source code of windows server 2003
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.

156 lines
4.2 KiB

  1. // Exception.cpp -- IOP Exception class definition
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #include <scuExcHelp.h>
  8. #include "iopExc.h"
  9. using namespace iop;
  10. /////////////////////////// LOCAL/HELPER /////////////////////////////////
  11. namespace
  12. {
  13. scu::CauseCodeDescriptionTable<iop::Exception::CauseCode> ccdt[] =
  14. {
  15. {
  16. ccAclNotSupported,
  17. TEXT("ACL is not supported.")
  18. },
  19. {
  20. ccAclNotTranslatable,
  21. TEXT("ACL is not translatable.")
  22. },
  23. {
  24. ccAlgorithmIdNotSupported,
  25. TEXT("The algorithm id is not supported.")
  26. },
  27. {
  28. ccBadFileCategory,
  29. TEXT("An unsupported file category was returned from the "
  30. "card.")
  31. },
  32. {
  33. ccBadFilePath,
  34. TEXT("An invalid file path was specified.")
  35. },
  36. {
  37. ccBadInstanceFile,
  38. TEXT("The file was created without an AID for file "
  39. "control.")
  40. },
  41. {
  42. ccBadLockReferenceCount,
  43. TEXT("Lock count invalid.")
  44. },
  45. {
  46. ccCannotInterpretGetResponse,
  47. TEXT("The response returned from the card was "
  48. "uninterpretable.")
  49. },
  50. {
  51. ccCyclicRecordSizeTooLarge,
  52. TEXT("The record size for the cyclic file is too large.")
  53. },
  54. {
  55. ccDirectoryNotEmpty,
  56. TEXT("The directory is not empty.")
  57. },
  58. {
  59. ccFail,
  60. TEXT("An unknown error occured.")
  61. },
  62. {
  63. ccFileIdNotHex,
  64. TEXT("The file ID specified is not in hexadecimal form.")
  65. },
  66. {
  67. ccFileIdTooLarge,
  68. TEXT("The file ID specified is too large.")
  69. },
  70. {
  71. ccFilePathTooLong,
  72. TEXT("The file path is too long.")
  73. },
  74. {
  75. ccFileTypeUnknown,
  76. TEXT("The file type specified is unknown.")
  77. },
  78. {
  79. ccFileTypeInvalid,
  80. TEXT("The file type specifies is invalid.")
  81. },
  82. {
  83. ccInvalidChecksum,
  84. TEXT("Invalid checksum.")
  85. },
  86. {
  87. ccInvalidChv,
  88. TEXT("Invalid CHV specified. CHV1 and CHV2 are the only "
  89. "CHVs supported.")
  90. },
  91. {
  92. ccInvalidParameter,
  93. TEXT("Invalid parameter.")
  94. },
  95. {
  96. ccLockCorrupted,
  97. TEXT("Lock corrupted.")
  98. },
  99. {
  100. ccMutexHandleChanged,
  101. TEXT("Original mutex handle lost.")
  102. },
  103. {
  104. ccNoFileSelected,
  105. TEXT("A file must be selected before performing this "
  106. "operation.")
  107. },
  108. {
  109. ccNotImplemented,
  110. TEXT("The function is not implemented."),
  111. },
  112. {
  113. ccResourceManagerDisabled,
  114. TEXT("The Microsoft Resource Manager is not running.")
  115. },
  116. {
  117. ccSelectedFileNotDirectory,
  118. TEXT("Currently selected file is not a directory.")
  119. },
  120. {
  121. ccSynchronizationObjectNameTooLong,
  122. TEXT("The synchronization object name is too long.")
  123. },
  124. {
  125. ccUnknownCard,
  126. TEXT("The card is not recognized.")
  127. },
  128. {
  129. ccUnsupportedCommand,
  130. TEXT("Routine is not supported.")
  131. },
  132. {
  133. ccNoResponseAvailable,
  134. TEXT("No response is available from the card.")
  135. },
  136. {
  137. ccBadATR,
  138. TEXT("The ATR is malformed.")
  139. }
  140. };
  141. } // namespace
  142. char const *
  143. iop::Description(Exception const &rExc)
  144. {
  145. return scu::FindDescription(rExc.Cause(), ccdt,
  146. sizeof ccdt / sizeof *ccdt);
  147. }