[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:
parent
d4eac3ddca
commit
a6ff11f1d2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue