Remove uncaught error vars

This commit is contained in:
Andreas Lubbe
2015-09-13 12:27:07 +02:00
parent 1739c9d720
commit d3cff9082f
4 changed files with 15 additions and 16 deletions

View File

@@ -46,7 +46,7 @@
}); });
exports.run = function() { exports.run = function() {
var arg, args, e, error, i, len, ref, results; var arg, args, e, i, len, ref, results;
global.__originalDirname = fs.realpathSync('.'); global.__originalDirname = fs.realpathSync('.');
process.chdir(cakefileDirectory(__originalDirname)); process.chdir(cakefileDirectory(__originalDirname));
args = process.argv.slice(2); args = process.argv.slice(2);

View File

@@ -26,7 +26,7 @@
withPrettyErrors = function(fn) { withPrettyErrors = function(fn) {
return function(code, options) { return function(code, options) {
var err, error; var err;
if (options == null) { if (options == null) {
options = {}; options = {};
} }
@@ -217,7 +217,7 @@
} }
exports._compileFile = function(filename, sourceMap) { exports._compileFile = function(filename, sourceMap) {
var answer, err, error, raw, stripped; var answer, err, raw, stripped;
if (sourceMap == null) { if (sourceMap == null) {
sourceMap = false; sourceMap = false;
} }

View File

@@ -112,7 +112,7 @@
}; };
compilePath = function(source, topLevel, base) { compilePath = function(source, topLevel, base) {
var code, err, error, error1, error2, file, files, i, len, results, stats; var code, err, file, files, i, len, results, stats;
if (indexOf.call(sources, source) >= 0 || watchedDirs[source] || !topLevel && (notSources[source] || hidden(source))) { if (indexOf.call(sources, source) >= 0 || watchedDirs[source] || !topLevel && (notSources[source] || hidden(source))) {
return; return;
} }
@@ -140,8 +140,8 @@
} }
try { try {
files = fs.readdirSync(source); files = fs.readdirSync(source);
} catch (error1) { } catch (error) {
err = error1; err = error;
if (err.code === 'ENOENT') { if (err.code === 'ENOENT') {
return; return;
} else { } else {
@@ -163,8 +163,8 @@
} }
try { try {
code = fs.readFileSync(source); code = fs.readFileSync(source);
} catch (error2) { } catch (error) {
err = error2; err = error;
if (err.code === 'ENOENT') { if (err.code === 'ENOENT') {
return; return;
} else { } else {
@@ -178,7 +178,7 @@
}; };
findDirectoryIndex = function(source) { findDirectoryIndex = function(source) {
var err, error, ext, i, index, len, ref1; var err, ext, i, index, len, ref1;
ref1 = CoffeeScript.FILE_EXTENSIONS; ref1 = CoffeeScript.FILE_EXTENSIONS;
for (i = 0, len = ref1.length; i < len; i++) { for (i = 0, len = ref1.length; i < len; i++) {
ext = ref1[i]; ext = ref1[i];
@@ -199,7 +199,7 @@
}; };
compileScript = function(file, input, base) { compileScript = function(file, input, base) {
var compiled, err, error, message, o, options, t, task; var compiled, err, message, o, options, t, task;
if (base == null) { if (base == null) {
base = null; base = null;
} }
@@ -289,12 +289,11 @@
}; };
watch = function(source, base) { watch = function(source, base) {
var compile, compileTimeout, err, error, prevStats, rewatch, startWatcher, watchErr, watcher; var compile, compileTimeout, err, prevStats, rewatch, startWatcher, watchErr, watcher;
watcher = null; watcher = null;
prevStats = null; prevStats = null;
compileTimeout = null; compileTimeout = null;
watchErr = function(err) { watchErr = function(err) {
var error;
if (err.code !== 'ENOENT') { if (err.code !== 'ENOENT') {
throw err; throw err;
} }
@@ -353,7 +352,7 @@
}; };
watchDir = function(source, base) { watchDir = function(source, base) {
var err, error, readdirTimeout, startWatcher, stopWatcher, watcher; var err, readdirTimeout, startWatcher, stopWatcher, watcher;
watcher = null; watcher = null;
readdirTimeout = null; readdirTimeout = null;
startWatcher = function() { startWatcher = function() {
@@ -365,7 +364,7 @@
}).on('change', function() { }).on('change', function() {
clearTimeout(readdirTimeout); clearTimeout(readdirTimeout);
return readdirTimeout = wait(25, function() { return readdirTimeout = wait(25, function() {
var err, error, file, files, i, len, results; var err, file, files, i, len, results;
try { try {
files = fs.readdirSync(source); files = fs.readdirSync(source);
} catch (error) { } catch (error) {
@@ -429,7 +428,7 @@
}; };
silentUnlink = function(path) { silentUnlink = function(path) {
var err, error, ref1; var err, ref1;
try { try {
return fs.unlinkSync(path); return fs.unlinkSync(path);
} catch (error) { } catch (error) {

View File

@@ -19,7 +19,7 @@
historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0,
historyMaxInputSize: 10240, historyMaxInputSize: 10240,
"eval": function(input, context, filename, cb) { "eval": function(input, context, filename, cb) {
var Assign, Block, Literal, Value, ast, err, error, js, ref1, referencedVars, token, tokens; var Assign, Block, Literal, Value, ast, err, js, ref1, referencedVars, token, tokens;
input = input.replace(/\uFF00/g, '\n'); input = input.replace(/\uFF00/g, '\n');
input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1');
ref1 = require('./nodes'), Block = ref1.Block, Assign = ref1.Assign, Value = ref1.Value, Literal = ref1.Literal; ref1 = require('./nodes'), Block = ref1.Block, Assign = ref1.Assign, Value = ref1.Value, Literal = ref1.Literal;