Skip to content

Commit

Permalink
Merge pull request #4464 from jcrist/add-newline-error-messages
Browse files Browse the repository at this point in the history
Add a newline in patched errors
  • Loading branch information
seibert committed Aug 29, 2019
2 parents 61593ae + 8160ad7 commit 196fb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numba/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def error_rewrite(e, issue_type):
"""
if config.SHOW_HELP:
help_msg = errors.error_extras[issue_type]
e.patch_message(''.join(e.args) + help_msg)
e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
if config.FULL_TRACEBACKS:
raise e
else:
Expand Down Expand Up @@ -390,7 +390,7 @@ def error_rewrite(e, issue_type):
if config.SHOW_HELP:
if hasattr(e, 'patch_message'):
help_msg = errors.error_extras['reportable']
e.patch_message(''.join(e.args) + help_msg)
e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
# ignore the FULL_TRACEBACKS config, this needs reporting!
raise e

Expand Down

0 comments on commit 196fb2c

Please sign in to comment.