Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gooofy committed Sep 26, 2017
1 parent 3f99788 commit 6780bc1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions speech_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ def lex_set_token(token):

ipas = lex_entry['ipa']

tts.say_ipa(ipas)


try:
tts.say_ipa(ipas)
except:
logging.error('EXCEPTION CAUGHT %s' % traceback.format_exc())


def lex_edit(token):
Expand Down Expand Up @@ -578,12 +579,15 @@ def paint_main(stdscr, cur_ts):
ts['ts'] = misc.edit_popup(stdscr, ' Transcript ', ts['ts'])

elif c == ord('l'):
if missing_token:
t = missing_token
else:
t = tokenize(ts['ts'])[0]

lex_edit(t)
if len(ts['ts'])>0 or missing_token:

if missing_token:
t = missing_token
else:
t = tokenize(ts['ts'])[0]

lex_edit(t)


#
Expand Down

0 comments on commit 6780bc1

Please sign in to comment.