[react-packager] Fixes stack traces

Summary:
TransformErrors weren't showing stack traces, making it hard to debug problems in transformer code.
This commit is contained in:
Thomas Aylott 2015-08-05 12:31:51 -07:00
parent 7b1ffed4e7
commit f47a29f922
1 changed files with 3 additions and 1 deletions

View File

@ -121,7 +121,9 @@ Transformer.prototype.loadFileAndTransform = function(filePath) {
});
};
function TransformError() {}
function TransformError() {
Error.captureStackTrace && Error.captureStackTrace(this, TransformError);
}
util.inherits(TransformError, SyntaxError);
function formatError(err, filename, source) {