Skip to content
Tcl Source Code History Of Ticket 800716ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 800716ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 800716ffffffffffffffffffffffffffffffffff

  1. Ticket change [2aca1d5917] (rid 118633) by davygrvy on 2003-09-04 21:37:59:

    1. assignee initialized to: "stwo"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      TclWinConvertError and TclWinConvertWSAError are 
      private internal functions.  They could be very useful to 
      extension authors.  I see a need for it.  Let's make them 
      public.
      
      Also, TclWinConvertWSAError doesn't map to all WSAE* 
      error codes.  Included are mappings to all of them.  
      Unfortunetly, all the added can only return EINVAL until 
      the posix codes they translate into get more meaningful 
      to windows.  Effectively, the behavior is still unchanged.
      
      Example:
      
      WSA_QOS_POLICY_FAILURE,  'rejected for administrative 
      reasons - bad credentials'
      WSAEPROVIDERFAILEDINIT, 'The requested service 
      provider could not be loaded or initialized'
      
      What posix codes do those get?  Some detective work 
      needs to be done with these.  I really don't have a clue.
      
      The main reason I want to enlargen the mappings is to 
      include WSAHOST_NOT_FOUND.  I hate that the 
      [socket] command can only return 'invalid argument' 
      instead of 'authoritative host not found' or 'try again', 
      or ....
      
      Should this really be a TIP?
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "davygrvy"
    9. subsystem initialized to: "52. Portability Support"
    10. title initialized to:
      publicize TclWinConvertError and TclWinConvertWSAError
      
    11. type initialized to: "Patch"
  2. Ticket change [12b1ba2333] (rid 124087) by davygrvy on 2003-09-05 04:38:00:

    1. icomment:
      
      
      File Added - 60637: patch.txt
      
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  3. Add attachment "patch.txt" [4a274eef40] (rid 126490) by davygrvy on 2003-09-05 04:38:00.

  4. Ticket change [2a69756dcc] (rid 118565) by davygrvy on 2003-09-05 17:35:46:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      It would be nice also, if Tcl_ErrnoMsg() returned localized 
      strings.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  5. Ticket change [b95a8ed2d0] (rid 129125) by davygrvy on 2003-09-05 18:51:57:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Please ignore that last post.  That would break ALL scripts 
      that did matching on error messages ;)
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  6. Ticket change [8e59eb5a4c] (rid 120102) by dgp on 2003-09-05 21:58:23:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Localized error messages are
       still a good idea, just one that needs
      to wait for a more thorough use of
      ::errorCode for script processing.
      jenglish and kbk both have ideas
      on this, but over a fairly extended
      time frame.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [8cf218dead] (rid 127828) by davygrvy on 2003-09-10 07:05:07:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Here's another patch that adds Tcl_Win32Error(), 
      Tcl_Win32ErrId(), Tcl_Win32ErrMsg(), and Tcl_Win32ErrMsgVA
      ().
      
      The concept of setting errno and returning from a function is 
      usually then displayed to the user with Tcl_PosixError() in a 
      generic layer for setting $errorCode.  Tcl_Win32Error() is 
      exactly analogous to that, except that it gets the error code 
      from GetLastError() for the exact windows error.
      
      I would use this from an extension!  See the shift?  Instead of 
      returning from a function with errno set, give the function the 
      interp and let it set $errorCode itself.  This concept is working 
      well in a project I'm doing.  NOTHING is getting lost in a 
      translation as there aren't any to be made!
      
      Tcl_Win32ErrId() is 100% complete and match the october 
      2002 release of the platform SDK.  Error messages are asked 
      for from the system with FormatMessage and could support 
      localization...
      
      win/tclWinError.c builds with stock VC5, VC6, and with the 
      platform SDK headers, too.
      
      my wrists are sore.. where's an ice pack in this house?
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  8. Add attachment "patch.zip" [759343a11d] (rid 105413) by davygrvy on 2003-09-10 07:07:42.

  9. Ticket change [838e13c824] (rid 117401) by davygrvy on 2003-09-10 07:07:42:

    1. icomment:
      
      
      File Added - 61125: patch.zip
      
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  10. Ticket change [11f5b82df8] (rid 95234) by davygrvy on 2003-09-10 07:18:50:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Code could be added so that if Tcl(_)WinConvertError can't 
      make the translation, the native message could be used 
      instead.
      
      But Tcl is supposed to the great equilizer, and this new 
      concept might be foriegn as it attemps to break from 'least 
      common denominator' hole and might not be helpful for the 
      places that are to provide a generic interface.
      
      In places where the native message is desirable, the ability to 
      get it, is now easy.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  11. Ticket change [0a8d85cd2c] (rid 113840) by davygrvy on 2003-09-10 08:13:24:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Here's some code that shows how an extension could make 
      use of this feature:
      
      CONST char *
      ExpWinExpError TCL_VARARGS_DEF(Tcl_Interp *, arg1)
      {
          CONST char *id, *msg;
          va_list argList;
          Tcl_Interp *interp;
          DWORD err = GetLastError();
      
          interp = TCL_VARARGS_START(Tcl_Interp *, arg1, argList);
      
          /*
           * If the "customer" bit is set, this error is ours. else 
      forward
           * it to the system.
           */
      
          if (errorCode & (0x1 << 29)) {
      id = ExpWinExpErrId(err);
      msg = ExpWinExpErrMsgVA(err, argList);
      Tcl_SetErrorCode(interp, "EXPECT", id, msg, 0L);
          } else {
      id = Tcl_Win32ErrId(err);
      msg = Tcl_Win32ErrMsgVA(err, argList);
      Tcl_SetErrorCode(interp, "WIN32", id, msg, 0L);
          }
          va_end(argList);
          return msg;
      }
      
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  12. Ticket change [e395a0dd4d] (rid 199951) by jan.nijtmans on 2022-04-05 06:31:39:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459674.77198579"
    3. closer changed to: "jan.nijtmans"
    4. comment changed to:
      TclWinConvertError and TclWinConvertWSAError are 
      private internal functions.  They could be very useful to 
      extension authors.  I see a need for it.  Let's make them 
      public.
      
      Also, TclWinConvertWSAError doesn't map to all WSAE* 
      error codes.  Included are mappings to all of them.  
      Unfortunetly, all the added can only return EINVAL until 
      the posix codes they translate into get more meaningful 
      to windows.  Effectively, the behavior is still unchanged.
      
      Example:
      
      WSA_QOS_POLICY_FAILURE,  'rejected for administrative 
      reasons - bad credentials'
      WSAEPROVIDERFAILEDINIT, 'The requested service 
      provider could not be loaded or initialized'
      
      What posix codes do those get?  Some detective work 
      needs to be done with these.  I really don't have a clue.
      
      The main reason I want to enlargen the mappings is to 
      include WSAHOST_NOT_FOUND.  I hate that the 
      [socket] command can only return 'invalid argument' 
      instead of 'authoritative host not found' or 'try again', 
      or ....
      
      Should this really be a TIP?
      
    5. icomment:
      Done: [https://core.tcl-lang.org/tips/doc/trunk/tip/598.md]
      
    6. login: "jan.nijtmans"
    7. mimetype: "text/x-fossil-wiki"
    8. resolution changed to: "Fixed"
    9. severity changed to: "Minor"
    10. status changed to: "Closed"