[Mono-list] Some patches regarding Win32Exception

Miguel de Icaza miguel@ximian.com
16 May 2002 16:05:38 -0400


Hello Jaroslaw!

> I'd like to contribute some error descriptions for System.ComponentModel.Win32Exception.cs
> (included in patch1.txt)

Thanks a lot!  I have now applied these changes, and they are now on the
CVS repository.  They should show up in tonight's snapshot.

> I'd also like to contribute a small PERL utility "update_win32_errors.pl" that, when executed at the top level of source code (which is below mono and mcs and gtk-sharp) will scan through all "*.c" source files in mono looking for WSASetLastError(...) and SetLastError(...) calls and for all errors that are not handled in Win32Exception.cs it will generate the appropriate source code to stdout.

It would be best if you could routinely run this script.  Another option
would be to integrate it into some kind of regression test suite, but it
is important that it either becomes a full part of the build, otherwise
this kind of programs tend to suffer bit rot.

> I'm also sending a patch to sockets.c to check for bind() EADDRINUSE error (Address already in use, perhaps the most common bind() error) (patch2.txt)

Thanks, I have also applied this patch.

> BTW. I'm not sure if all error texts should be in "Win32Exception.cs" instead of "SocketException.cs", but it's very easy to fix.

I applied them to Win32Exception.cs, we can move them later if we need
to.

Thanks a lot!
Miguel