Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Fixes #187: Nicer error messages when a source map fails to parse
Browse files Browse the repository at this point in the history
Adding `mapPath` and `pathToGenerated` to the error message logged.
  • Loading branch information
nojvek authored Mar 14, 2017
1 parent e65e606 commit 700b90f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sourceMaps/sourceMapFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function getMapForGeneratedPath(pathToGenerated: string, mapPath: string,
// Throws for invalid JSON
return new SourceMap(pathToGenerated, contents, webRoot, sourceMapPathOverrides);
} catch (e) {
logger.error(`SourceMaps.getMapForGeneratedPath: exception while processing sourcemap: ${e.stack}`);
logger.error(`SourceMaps.getMapForGeneratedPath: exception while processing path: ${pathToGenerated}, sourcemap: ${mapPath}\n${e.stack}`);
return null;
}
} else {
Expand Down

0 comments on commit 700b90f

Please sign in to comment.