BUG: Incorrect error numbers being reported with TCPSocket

Discussion in 'Ruby' started by Alan Davies, Aug 5, 2003.

  1. Alan Davies

    Alan Davies Guest

    Hello

    I'm using ruby 1.8.0 on windows 2000. I've discovered that when
    TCPSocket.new raises an exception, the Exception.errno variable contains
    the wrong error number, and subsequently, $! contains the wrong error
    text.

    e.g.
    TCPSocket.new("some.host.com", 80)

    if some.host.com is not listening on port 80, you should receive error
    10061: "No connection could be made because the target machine actively
    refused it." This is the error I used to receive with ruby 1.6.7

    However, with ruby 1.8.0, I get error 61: "The printer queue is full"
    This is obviously incorrect. It seems that 10000 has been subtracted
    from the error number for some strange reason.

    Cheers,
    Alan.
     
    Alan Davies, Aug 5, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chanmm
    Replies:
    2
    Views:
    10,647
    brinda
    Sep 7, 2010
  2. =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Replies:
    0
    Views:
    2,397
    =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Jun 7, 2004
  3. John Bonds
    Replies:
    2
    Views:
    2,738
    Amaryllis
    Aug 3, 2004
  4. Patrick Stinson

    incorrect line reported in traceback

    Patrick Stinson, Dec 1, 2008, in forum: Python
    Replies:
    2
    Views:
    338
    Patrick Stinson
    Dec 1, 2008
  5. Hal Fulton

    Errors in line numbers reported?

    Hal Fulton, Oct 26, 2004, in forum: Ruby
    Replies:
    35
    Views:
    374
    Markus
    Oct 27, 2004
Loading...

Share This Page