mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Remove uncaught error vars
This commit is contained in:
parent
1739c9d720
commit
d3cff9082f
4 changed files with 15 additions and 16 deletions
|
@ -46,7 +46,7 @@
|
|||
});
|
||||
|
||||
exports.run = function() {
|
||||
var arg, args, e, error, i, len, ref, results;
|
||||
var arg, args, e, i, len, ref, results;
|
||||
global.__originalDirname = fs.realpathSync('.');
|
||||
process.chdir(cakefileDirectory(__originalDirname));
|
||||
args = process.argv.slice(2);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
withPrettyErrors = function(fn) {
|
||||
return function(code, options) {
|
||||
var err, error;
|
||||
var err;
|
||||
if (options == null) {
|
||||
options = {};
|
||||
}
|
||||
|
@ -217,7 +217,7 @@
|
|||
}
|
||||
|
||||
exports._compileFile = function(filename, sourceMap) {
|
||||
var answer, err, error, raw, stripped;
|
||||
var answer, err, raw, stripped;
|
||||
if (sourceMap == null) {
|
||||
sourceMap = false;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
};
|
||||
|
||||
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))) {
|
||||
return;
|
||||
}
|
||||
|
@ -140,8 +140,8 @@
|
|||
}
|
||||
try {
|
||||
files = fs.readdirSync(source);
|
||||
} catch (error1) {
|
||||
err = error1;
|
||||
} catch (error) {
|
||||
err = error;
|
||||
if (err.code === 'ENOENT') {
|
||||
return;
|
||||
} else {
|
||||
|
@ -163,8 +163,8 @@
|
|||
}
|
||||
try {
|
||||
code = fs.readFileSync(source);
|
||||
} catch (error2) {
|
||||
err = error2;
|
||||
} catch (error) {
|
||||
err = error;
|
||||
if (err.code === 'ENOENT') {
|
||||
return;
|
||||
} else {
|
||||
|
@ -178,7 +178,7 @@
|
|||
};
|
||||
|
||||
findDirectoryIndex = function(source) {
|
||||
var err, error, ext, i, index, len, ref1;
|
||||
var err, ext, i, index, len, ref1;
|
||||
ref1 = CoffeeScript.FILE_EXTENSIONS;
|
||||
for (i = 0, len = ref1.length; i < len; i++) {
|
||||
ext = ref1[i];
|
||||
|
@ -199,7 +199,7 @@
|
|||
};
|
||||
|
||||
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) {
|
||||
base = null;
|
||||
}
|
||||
|
@ -289,12 +289,11 @@
|
|||
};
|
||||
|
||||
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;
|
||||
prevStats = null;
|
||||
compileTimeout = null;
|
||||
watchErr = function(err) {
|
||||
var error;
|
||||
if (err.code !== 'ENOENT') {
|
||||
throw err;
|
||||
}
|
||||
|
@ -353,7 +352,7 @@
|
|||
};
|
||||
|
||||
watchDir = function(source, base) {
|
||||
var err, error, readdirTimeout, startWatcher, stopWatcher, watcher;
|
||||
var err, readdirTimeout, startWatcher, stopWatcher, watcher;
|
||||
watcher = null;
|
||||
readdirTimeout = null;
|
||||
startWatcher = function() {
|
||||
|
@ -365,7 +364,7 @@
|
|||
}).on('change', function() {
|
||||
clearTimeout(readdirTimeout);
|
||||
return readdirTimeout = wait(25, function() {
|
||||
var err, error, file, files, i, len, results;
|
||||
var err, file, files, i, len, results;
|
||||
try {
|
||||
files = fs.readdirSync(source);
|
||||
} catch (error) {
|
||||
|
@ -429,7 +428,7 @@
|
|||
};
|
||||
|
||||
silentUnlink = function(path) {
|
||||
var err, error, ref1;
|
||||
var err, ref1;
|
||||
try {
|
||||
return fs.unlinkSync(path);
|
||||
} catch (error) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0,
|
||||
historyMaxInputSize: 10240,
|
||||
"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(/^\(([\s\S]*)\n\)$/m, '$1');
|
||||
ref1 = require('./nodes'), Block = ref1.Block, Assign = ref1.Assign, Value = ref1.Value, Literal = ref1.Literal;
|
||||
|
|
Loading…
Reference in a new issue