Outputting errors in messc again.

This commit is contained in:
Tom MacWright 2011-01-27 09:56:39 -05:00
parent 2590b987d6
commit 047fc6e88b
2 changed files with 4 additions and 2 deletions

View File

@ -79,7 +79,9 @@ fs.readFile(input, 'utf-8', function (e, data) {
local_data_dir: path.dirname(input),
}).render(data, function(err, output) {
if (err) {
mess.writeError(err, options);
err.forEach(function(e) {
mess.writeError(e, options);
});
process.exit(1);
} else {
if (!options.benchmark) {

View File

@ -477,7 +477,7 @@ mess.Renderer = function Renderer(env) {
+ '+nadgrids=@null +no_defs">\n');
output.push('</Map>');
callback(null, output.join('\n'));
callback(env.errors.length ? env.errors : null, output.join('\n'));
}
);
},