diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-08-16 15:47:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-16 15:47:57 -0400 |
| commit | e51587f58310de8dc7fd93ac54687df313225417 (patch) | |
| tree | b9d66d96b500408395d1309e36b7ef798e608cb3 | |
| parent | 0f882f07eb0fc263fcb8e05c1a212199902863da (diff) | |
| parent | c4c3123fec2611c79c35db0f61ec1e0246ddefde (diff) | |
Merge pull request #266 from inkstitch/lexelby-stub-error-message
useful error message from stub.py
| -rw-r--r-- | stub.py | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -3,6 +3,7 @@ import sys import os import subprocess +import traceback # ink/stitch # @@ -30,8 +31,17 @@ args[0] = binary_path # os.execve works here for Linux, but only this seems to get the # extension output to Inkscape on Windows -extension = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -stdout, stderr = extension.communicate() +try: + extension = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = extension.communicate() +except: + print >> sys.stderr, "Unexpected error launching Ink/Stitch." + print >> sys.stderr, "If you're having trouble, please file an issue here, including the text below: https://github.com/inkstitch/inkstitch/issues\n" + print >> sys.stderr, "Tried to launch:", binary_path + print >> sys.stderr, "Arguments:", args + print >> sys.stderr, "Debugging information:\n" + print >> sys.stderr, traceback.format_exc() + sys.exit(1) stdout = stdout.strip() if stdout: |
