Skip to content

Commit

Permalink
fixed #227 - filename missing in compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
bjouhier committed Jun 9, 2015
1 parent 25a5fc2 commit 815f027
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/compiler/underscored.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ function run(options, registerOnly) {
if (options.generators) subdir = options.fast ? "generators-fast" : "generators";
else if (options.fibers) subdir = options.fast ? "fibers-fast" : "fibers";
var transformer = "../" + subdir + "/transform";
var streamline = require(transformer).transform;
var transform = require(transformer).transform;
function streamline(source, options) {
try {
return transform(source, options);
} catch (err) {
if (options.sourceName && err.message.indexOf(options.sourceName) >= 0) throw err;
throw new Error("error streamlining " + (options.sourceName || '<unknown>') + ": " + err.stack);
}
}

function clone(obj) {
return Object.keys(obj).reduce(function(val, key) {
Expand Down

1 comment on commit 815f027

@bjouhier
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong commit message. Fix was for #277

Please sign in to comment.