I got the same error with node.js 0.8 (on windows 7 64 bit if it matters)

And... I wrote some small script that does not fail to throw the error:

var net = require('net');
>
> var connection;
>
>
>> try{
>
> connection = net.connect({'port':6667,'host':'freenode.net'},function () { 
>
> console.log('connection open');
>
> });
>
> connection.setEncoding('utf8');
>
> connection.on('data', function (data) {
>
> console.dir(data);
>
> });
>
> connection.on('end', function () {
>
> console.log('irc conenction closed');
>
> });
>
> }catch(err){
>
> console.log('error: '+err);
>
> }
>
>
it does give  

> C:\some\path>node test.js
>
>
>> events.js:66
>
>         throw arguments[1]; // Unhandled 'error' event
>
>                        ^
>
> Error: connect ECONNREFUSED
>
>     at errnoException (net.js:781:11)
>
>     at Object.afterConnect [as oncomplete] (net.js:772:19)
>
>
> If I add:

> process.on('uncaughtException', function(err) {
>
>   console.log(err);
>
> });
>
> The console logs:

>  { [Error: connect ECONNREFUSED]

  code: 'ECONNREFUSED',

  errno: 'ECONNREFUSED',

  syscall: 'connect' }


Now I know that the reason is, that the server is indeed refusing the 
connection but I was wondering...
why dosn't it catch the error? why is it uncaught, even though it is inside 
a try catch statement?

also this has nothing to do with gzip

On Wednesday, February 22, 2012 11:27:16 PM UTC+1, Mikeal Rogers wrote:
>
> You can create a node.js streaming gzip http server and connect to it in 
> node within a single test file. If you can reproduce the problem with a 
> single node script then there is a 100% chance it will get fixed.
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to