Skip to content

Commit

Permalink
Fix say all error when on Desktop (PR #10723)
Browse files Browse the repository at this point in the history
Co-authored-by: Reef Turner <reef@nvaccess.org>
  • Loading branch information
clementb49 and feerrenrut authored Jul 31, 2020
1 parent 39606f1 commit 87eee7f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/sayAllHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ def stop(self):
def readText(cursor):
global lastSayAllMode, _activeSayAll
lastSayAllMode=cursor
reader = _TextReader(cursor)
try:
reader = _TextReader(cursor)
except NotImplementedError:
log.debugWarning("Unable to make reader", exc_info=True)
return
_activeSayAll = weakref.ref(reader)
reader.nextLine()

Expand Down Expand Up @@ -110,8 +114,8 @@ def __init__(self, cursor):
if cursor == CURSOR_CARET:
try:
self.reader = api.getCaretObject().makeTextInfo(textInfos.POSITION_CARET)
except (NotImplementedError, RuntimeError):
return
except (NotImplementedError, RuntimeError) as e:
raise NotImplementedError("Unable to make TextInfo: " + str(e))
else:
self.reader = api.getReviewPosition()
self.speakTextInfoState = speech.SpeakTextInfoState(self.reader.obj)
Expand Down

0 comments on commit 87eee7f

Please sign in to comment.