log an exception if search-thread encounters a failure

This commit is contained in:
2025-10-08 06:51:52 +01:00
parent 4d1b2073dc
commit 108e021fdb
3 changed files with 3 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ struct
let
val iterator = LineGap.moveIteratorToIdx (idx, iterator)
in
if LineGap.isIteratorAtEnd iterator then
if idx = #textLength iterator then
if prevFinalPos < 0 then acc
else PersistentVector.append (startPos, prevFinalPos, acc)
else

View File

@@ -7,6 +7,7 @@ struct
val (buffer, dfa, time) = Mailbox.recv SearchMailbox.mailbox
val iterator = LineGap.makeStringIterator buffer
val searchList = SearchList.build (iterator, dfa)
handle e => ExceptionLogger.log e
val msg = InputMsg.WITH_SEARCH_LIST (searchList, time)
val () = InputMailbox.append msg
in