Permalink
Browse files

Adding error catching. Adding output formatting for regular repl output

  • Loading branch information...
1 parent 7694850 commit 2d35c59ed9f5b2bcd41a12160888d14412e0ad1f Mike Mattozzi committed May 5, 2011
Showing with 6 additions and 1 deletion.
  1. +1 −0 webrepl.css
  2. +5 −1 webrepl.js
View
@@ -82,6 +82,7 @@ div#header {
div.replOut {
color: green;
+ white-space: pre;
}
div.replIn {
View
@@ -54,14 +54,18 @@ ReplHttpServer.prototype.start = function(port) {
} else {
// No auth required
self.server = http.createServer(function(req, res) { self.route(req, res); });
+ self.server.on('error', function() { /* Ignore Errors */ });
self.server.listen(port, this.hostname);
}
return self;
};
ReplHttpServer.prototype.route = function(req, res) {
var stream = this.stream;
-
+
+ req.on('error', function() { /* Ignore Errors */ });
+ res.on('error', function() { /* Ignore Errors */ });
+
var match = null;
if (req.url.match(/^\/repl/)) {
if (req.method === 'GET') {

0 comments on commit 2d35c59

Please sign in to comment.