#5 better error messages (socket)

open
None
5
2003-05-12
2003-05-12
No

Trivial patch using strerror() to produce more
descriptive error messages. Not sure if this function
also exists on Windows - if not, it should probably be
#ifdefed.

Discussion

  • Artur Klauser

    Artur Klauser - 2003-05-12

    patch against xmlrpc++0.7

     
  • Artur Klauser

    Artur Klauser - 2003-05-12
    • assigned_to: nobody --> cmorley
     
  • Nobody/Anonymous

    Logged In: NO

    strerror does exit under windows but I am not sure if it will
    acutally work properly - big suprise there. IF it doesn't work it
    can be done instead by this lovely complex call:

    FormatMessage(
    FORMAT_MESSAGE_ALLOCATE_BUFFER |
    FORMAT_MESSAGE_FROM_SYSTEM,
    NULL,
    GetLastError(),
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), //
    Default language
    (LPTSTR) &lpMsgBuf,
    0,
    NULL
    );

    GetLastError() should prolly be replaced with getError()

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks