Dmitry Kirsanov commited on
Commit
f17a732
·
1 Parent(s): c4d6264
Files changed (1) hide show
  1. fad.py +1 -1
fad.py CHANGED
@@ -245,7 +245,7 @@ class Fad:
245
  start_i = self.__goto_plaintext_i(fad, start)
246
  end_i = self.__goto_plaintext_i(fad, end)
247
  if start_i == None or end_i == None:
248
- raise Exception(f"Fad: {inspect.stack()[0][3]}: start or end outside range")
249
  newnote = self.newnote(notetype)
250
  newfad = fad[:start_i] + self.openmark(newnote.id) + fad[start_i:end_i] + self.closemark(newnote.id) + fad[end_i:]
251
  self.set(src, newfad)
 
245
  start_i = self.__goto_plaintext_i(fad, start)
246
  end_i = self.__goto_plaintext_i(fad, end)
247
  if start_i == None or end_i == None:
248
+ raise Exception(f"Fad: {inspect.stack()[0][3]}: start {start} or end {end} outside range {len(self.__plaintext(fad))}")
249
  newnote = self.newnote(notetype)
250
  newfad = fad[:start_i] + self.openmark(newnote.id) + fad[start_i:end_i] + self.closemark(newnote.id) + fad[end_i:]
251
  self.set(src, newfad)