Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replace sys with util

  • Loading branch information...
commit baecceb18e4bf86b41855e7e0fd712b25b0f6274 1 parent 6f0934c
Alexander Dorofeev authored October 29, 2010

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. 10  index.js
10  index.js
... ...
@@ -1,4 +1,4 @@
1  
-var sys = require('sys');
  1
+var util = require('util');
2 2
 var http = require('http');
3 3
 var url = require('url');
4 4
 var Buffer = require('buffer').Buffer;
@@ -201,14 +201,14 @@ Handler.prototype.execute = function() {
201 201
 Handler.prototype.handleError = function(e) {
202 202
     if (e instanceof HttpError) {
203 203
         if (e.code in http.STATUS_CODES) {
204  
-            sys.error(this._summary() + " " + e);
  204
+            util.error(this._summary() + " " + e);
205 205
             this.sendError(e.code, e.reason);
206 206
         } else {
207  
-            sys.error("Bad HTTP status code " + e.code);
  207
+            util.error("Bad HTTP status code " + e.code);
208 208
             this.sendError(e.code, e.reason);
209 209
         }
210 210
     } else {
211  
-        sys.error("Uncaught exception in " + this._summary() + "\n" +
  211
+        util.error("Uncaught exception in " + this._summary() + "\n" +
212 212
                 (e.stack || e));
213 213
         this.sendError(500, (e.stack || e));
214 214
     }
@@ -243,5 +243,5 @@ function HttpError(code, reason) {
243 243
     this.message = this.code + " " + this.reason;
244 244
     Error.captureStackTrace(this);
245 245
 }
246  
-sys.inherits(HttpError, Error);
  246
+util.inherits(HttpError, Error);
247 247
 exports.HttpError = HttpError;

0 notes on commit baecceb

Please sign in to comment.
Something went wrong with that request. Please try again.