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.

106 lines
2.6 KiB

  1. // Exception.cpp -- 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 "cciExc.h"
  9. /////////////////////////// LOCAL/HELPER /////////////////////////////////
  10. namespace
  11. {
  12. using namespace cci;
  13. scu::CauseCodeDescriptionTable<CauseCode> ccdt[] =
  14. {
  15. {
  16. ccBadKeySpec,
  17. TEXT("Unsupported key spec.")
  18. },
  19. {
  20. ccBadAccessSpec,
  21. TEXT("Bad access spec.")
  22. },
  23. {
  24. ccBadObjectType,
  25. TEXT("Bad object type.")
  26. },
  27. {
  28. ccBadLength,
  29. TEXT("Bad length.")
  30. },
  31. {
  32. ccBadPinLength,
  33. TEXT("Bad PIN length.")
  34. },
  35. {
  36. ccFormatNotSupported,
  37. TEXT("The card format is not supported.")
  38. },
  39. {
  40. ccFormatError,
  41. TEXT("Error encountered in the card format.")
  42. },
  43. {
  44. ccInvalidParameter,
  45. TEXT("Invalid parameter.")
  46. },
  47. {
  48. ccNoCertificate,
  49. TEXT("No certificate found.")
  50. },
  51. {
  52. ccNotImplemented,
  53. TEXT("This function is not implemented for this card.")
  54. },
  55. {
  56. ccNotPersonalized,
  57. TEXT("Card is not personalized.")
  58. },
  59. {
  60. ccOutOfPrivateKeySlots,
  61. TEXT("No more private key slots available.")
  62. },
  63. {
  64. ccOutOfSymbolTableSpace,
  65. TEXT("No space for additional symbols.")
  66. },
  67. {
  68. ccOutOfSymbolTableEntries,
  69. TEXT("No more symbol slots available.")
  70. },
  71. {
  72. ccStringTooLong,
  73. TEXT("Attempt to store a string that was too long.")
  74. },
  75. {
  76. ccSymbolNotFound,
  77. TEXT("Symbol not found.")
  78. },
  79. {
  80. ccKeyNotFound,
  81. TEXT("Key not found.")
  82. },
  83. {
  84. ccSymbolDataCorrupted,
  85. TEXT("Symbol data corrupted.")
  86. },
  87. {
  88. ccValueNotCached,
  89. TEXT("The value has not been cached. Cannot retrieve the "
  90. "value.")
  91. },
  92. };
  93. }
  94. char const *
  95. cci::Description(cci::Exception const &rExc)
  96. {
  97. return scu::FindDescription(rExc.Cause(), ccdt,
  98. sizeof ccdt / sizeof *ccdt);
  99. }