mirror of https://github.com/status-im/metro.git
[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
7b1ffed4e7
commit
f47a29f922
|
@ -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