Skip to content

Commit

Permalink
Fix parsing of different exception string formats (apache#4785)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorrill authored and alexwong committed Feb 28, 2020
1 parent ee40d77 commit c8e7fa1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/tvm/_ffi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ def _find_error_type(line):
return None
start_pos = line.rfind(":", 0, end_pos)
if start_pos == -1:
return None
err_name = line[start_pos + 1 : end_pos].strip()
err_name = line[:end_pos].strip()
else:
err_name = line[start_pos + 1 : end_pos].strip()
if _valid_error_name(err_name):
return err_name
return None
Expand Down

0 comments on commit c8e7fa1

Please sign in to comment.