Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
Fix DuplicateFormatFlagsException when max-iter-reached exceeded (#204)
Browse files Browse the repository at this point in the history
The warning message was formatted, and then this string was used as a format for warnf.  This fails for certain sentences.
  • Loading branch information
matthayes authored and Laurent Landowski committed Jan 28, 2017
1 parent f3c83e9 commit eddf52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/duckling/engine.clj
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@
(if (or max-iter-reached? max-stash-reached? finished?)
(do
(when max-iter-reached?
(warnf (format "@pass-all reached maximum iterations for sentence '%s'" sentence)))
(warnf "@pass-all reached maximum iterations for sentence '%s'" sentence))
(when max-stash-reached?
(warnf (format "@pass-all reached maximum stash size for sentence '%s'" sentence)))
(warnf "@pass-all reached maximum stash size for sentence '%s'" sentence))
stash)
(recur (pass-once stash rules sentence) (count stash) (dec remaining-iter))))))

Expand Down

0 comments on commit eddf52c

Please sign in to comment.