       # F841 - local variable 'SYMBOL' is assigned but never used
       symbol = /'([^']+)'/.exec(message)[1]
       tokenizedLine = textEditor.tokenizedLineForScreenRow(lineNumber)
+      if tokenizedLine is undefined
+        break
       offset = 0
       for token in tokenizedLine.tokens
         if token.value is symbol

    when 'H501'
      # H501 - do not use locals() for string formatting
      tokenizedLine = textEditor.tokenizedLineForScreenRow(lineNumber)
      offset = 0
      for token in tokenizedLine.tokens
        if 'meta.function-call.python' in token.scopes

      # E128 - continuation line under-indented for visual indent
      # E131 - continuation line unaligned for hanging indent
      tokenizedLine = textEditor.tokenizedLineForScreenRow(lineNumber)
      if tokenizedLine is undefined
        break
      offset = 0
      for token in tokenizedLine.tokens
        if not token.firstNonWhitespaceIndex
