Skip to content

Commit

Permalink
ENH: Better message
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Dec 9, 2016
1 parent acc7c1a commit f6e5fd8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sphinx_gallery/docs_resolv.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,12 @@ def _embed_code_links(app, gallery_conf, gallery_dir):
link = doc_resolvers[this_module].resolve(cobj,
full_fname)
except (HTTPError, URLError) as e:
print("The following error has occurred:\n")
print(repr(e))
if isinstance(e, HTTPError):
extra = e.code
else:
extra = e.reason
print("\t\tError resolving %s.%s: %r (%s)"
% (cobj['module'], cobj['name'], e, extra))
continue

if link is not None:
Expand Down

0 comments on commit f6e5fd8

Please sign in to comment.