diff --git a/packages/localize/src/tools/src/translate/source_files/es2015_translate_plugin.ts b/packages/localize/src/tools/src/translate/source_files/es2015_translate_plugin.ts index 5b643fceb5..0f8a9d01cf 100644 --- a/packages/localize/src/tools/src/translate/source_files/es2015_translate_plugin.ts +++ b/packages/localize/src/tools/src/translate/source_files/es2015_translate_plugin.ts @@ -35,6 +35,8 @@ export function makeEs2015TranslatePlugin( // since there must be something wrong with the structure of the AST generated // by Babel parsing a TaggedTemplateExpression. throw buildCodeFrameError(path, e); + } else { + throw e; } } } diff --git a/packages/localize/src/tools/src/translate/source_files/es5_translate_plugin.ts b/packages/localize/src/tools/src/translate/source_files/es5_translate_plugin.ts index e73aa40b43..32db7e890a 100644 --- a/packages/localize/src/tools/src/translate/source_files/es5_translate_plugin.ts +++ b/packages/localize/src/tools/src/translate/source_files/es5_translate_plugin.ts @@ -32,6 +32,8 @@ export function makeEs5TranslatePlugin( } catch (e) { if (isBabelParseError(e)) { diagnostics.error(buildCodeFrameError(callPath, e)); + } else { + throw e; } } }