home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / dax1.exe / DAP / DAPERR.C < prev    next >
Text File  |  1992-07-15  |  3KB  |  48 lines

  1. //   ╔════════════════════════════════════════════════════════════════════╗
  2. //   ║                                                                    ║
  3. //   ║ module:      daperr.c                                              ║
  4. //   ║ abstract:    This module contains the API that translates error    ║
  5. //   ║              codes to text messages.                               ║
  6. //   ║                                                                    ║
  7. //   ║ environment: NetWare 3.x v3.11                                     ║
  8. //   ║              Network C for NLMs SDK                                ║
  9. //   ║              CLib v3.11                                            ║
  10. //   ║              Network C for DOS v2.0                                ║
  11. //   ║              NetWare C Interface DOS v1.2                          ║
  12. //   ║                                                                    ║
  13. //   ║  This software is provided as is and carries no warranty           ║
  14. //   ║  whatsoever.  Novell disclaims and excludes any and all implied    ║
  15. //   ║  warranties of merchantability, title and fitness for a particular ║
  16. //   ║  purpose.  Novell does not warrant that the software will satisfy  ║
  17. //   ║  your requirements or that the software is without defect or error ║
  18. //   ║  or that operation of the software will be uninterrupted.  You are ║
  19. //   ║  using the software at your risk.  The software is not a product   ║
  20. //   ║  of Novell, Inc. or any of subsidiaries.                           ║
  21. //   ║                                                                    ║
  22. //   ╟────────────────────────────────────────────────────────────────────╢
  23. //   ║ maintenance history:                                               ║
  24. //   ║ level    date      pi   description                                ║
  25. //   ╟────────────────────────────────────────────────────────────────────╢
  26. //   ║  001   02/28/92    kl   initial release.                           ║
  27. //   ╚════════════════════════════════════════════════════════════════════╝
  28.  
  29. #include    "dap/dapsys.h"
  30.  
  31. char    *DAPTranslateReturnCode(T_RC rc)
  32. {
  33.         switch(rc){
  34.         case DAP_CANT_FIND_SERVER:      return "no such server";
  35.         case DAP_CANT_CONNECT:          return "unable to connect";
  36.         case DAP_PACKET_OUT_OF_SEQ:     return "packet sequence";
  37.         case DAP_SEND_FAILURE:          return "unable to send";
  38.         case DAP_INVALID_REQUEST:       return "invalid request";
  39.         case DAP_INITFAILED:            return "initialization failed";
  40.         case DAP_RESOURCE_ERROR:        return "resource error";
  41.         case DAP_INTERNAL_ERROR:        return "internal error";
  42.         case DAP_DIVIDE_BY_ZERO:        return "divide by zero";
  43.         case DAP_NUMERIC_OVERFLOW:      return "numeric overflow";
  44.         case DAP_TIMEOUT:               return "timeout receiving";
  45.         default:                        return "unknown error";
  46.         }
  47. }
  48.