diff --git a/react/jsx.py b/react/jsx.py index f67012f..070c6f4 100644 --- a/react/jsx.py +++ b/react/jsx.py @@ -42,7 +42,7 @@ def transform_string(self, jsx, harmony=False, strip_types=False): result = self.context.call( '%s.transform' % self.JSX_TRANSFORMER_JS_EXPR, jsx, opts) except execjs.ProgramError as e: - raise TransformError(e.message[7:]) + raise TransformError(str(e)) js = result['code'] return js diff --git a/react/utils/pipeline.py b/react/utils/pipeline.py index b95c762..7fc8932 100644 --- a/react/utils/pipeline.py +++ b/react/utils/pipeline.py @@ -34,4 +34,4 @@ def compile_file(self, infile, outfile, outdated=False, force=False): try: return self.transformer.transform(infile, outfile) except TransformError as e: - raise CompilerError(e.message) + raise CompilerError(str(e))