Skip to content

Commit

Permalink
support other forms of SyntaxError-like exceptions (e.g., Indentation…
Browse files Browse the repository at this point in the history
…Errors); tweak flaw message text
  • Loading branch information
mahmoud committed Apr 11, 2013
1 parent b6ef8a1 commit 20e017d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clastic/flaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_flaw_info(tb_str, parsed_error, mon_files):
<body>
<h1>Whopps!</h1>
<p>Clastic detected a modification, but couldn't restart your application. This is usually the result of a module-level error that prevents one of your application's modules from being imported. Fix the error and try refreshing the page.</p>
<p>Clastic detected a modification, but couldn't restart your application. This is often the result of a module-level error that prevents one of your application's modules from being imported. Fix the error and try refreshing the page.</p>
<h2>{exc_type}: {exc_msg}</h2>
<h3>Stack trace</h3>
Expand Down Expand Up @@ -75,7 +75,7 @@ def from_string(cls, tb_str):
if tb_lines[0].strip() == 'Traceback (most recent call last):':
frame_lines = tb_lines[1:-1]
frame_re = _frame_re
elif tb_lines[-1].startswith('SyntaxError'):
elif len(tb_lines) > 1 and tb_lines[-2].lstrip().startswith('^'):
frame_lines = tb_lines[:-2]
frame_re = _se_frame_re
else:
Expand Down

0 comments on commit 20e017d

Please sign in to comment.