adding a debug library
[nodejs-repoproxy.git] / lib / cache.js
index 4f98d3c..464c1b3 100644 (file)
@@ -103,10 +103,8 @@ function getAndService(unify, xpath, filesize) {
        log.debug("calling in here with filesize, ", filesize)
        unify.b.writeHead(200, {'Content-Length' : filesize});
 
-       
        global.repoproxy.downloads[unify.fullFilePath] = 1;
        
-
        http.get(xpath, function(res) {
 
            var file = fs.createWriteStream(unify.fullFilePath);
@@ -193,7 +191,8 @@ function inlineService(unify) {
                                                }
                                        }
                                } else {
-                                       log.debug("inline service - we're in a very bad place");
+                                       log.error("inline service - we're in a very bad place, how we ended up here we dont know, but we need to crash");
+                                       process.exit(10);
                                }
                        });