Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Catch error output from jspm api & raise error
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Aug 29, 2016
1 parent c8331d1 commit ab7b8c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion systemjs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import subprocess


VERSION = (1, 4, 0, 'beta', 3)
VERSION = (1, 4, 0, 'beta', 4)


default_app_config = 'systemjs.apps.SystemJSConfig'
Expand Down
6 changes: 6 additions & 0 deletions systemjs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ def bundle(self):
return rel_path


class TraceError(Exception):
pass


class SystemTracer(object):

def __init__(self, node_path=None):
Expand Down Expand Up @@ -210,6 +214,8 @@ def trace(self, app):
env=self.env, universal_newlines=True, cwd=self._package_json_dir
)
out, err = process.communicate()
if err:
raise TraceError(err)
self._trace_cache[app] = json.loads(out)
return self._trace_cache[app]

Expand Down

0 comments on commit ab7b8c2

Please sign in to comment.