Overview
| Artifact ID: | 8cf218dead273e32da188e999491cb2115647f59 |
|---|---|
| Ticket: | 800716ffffffffffffffffffffffffffffffffff
publicize TclWinConvertError and TclWinConvertWSAError |
| User & Date: | davygrvy on 2003-09-10 07:05:07 |
Changes
- 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?
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"