Skip to content

Commit a3cc6a7

Browse files
committed
Remove abort context from TooManyIterations log
1 parent 413428f commit a3cc6a7

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

booster/library/Booster/Pattern/ApplyEquations.hs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -331,18 +331,14 @@ iterateEquations direction preference startTerm = do
331331
config <- getConfig
332332
currentCount <- countSteps
333333
when (coerce currentCount > config.maxIterations) $ do
334-
-- FIXME if this exception is caught in evaluatePattern',
335-
-- then CtxAbort is a wrong context for it.
336-
-- We should emit this log entry somewhere else.
337-
withContext CtxAbort $ do
338-
logWarn $
339-
renderOneLineText $
340-
"Unable to finish evaluation in" <+> pretty currentCount <+> "iterations."
341-
withContext CtxDetail $
342-
getPrettyModifiers >>= \case
343-
ModifiersRep (_ :: FromModifiersT mods => Proxy mods) ->
344-
logMessage . renderOneLineText $
345-
"Final term:" <+> pretty' @mods currentTerm
334+
logWarn $
335+
renderOneLineText $
336+
"Unable to finish evaluation in" <+> pretty currentCount <+> "iterations."
337+
withContext CtxDetail $
338+
getPrettyModifiers >>= \case
339+
ModifiersRep (_ :: FromModifiersT mods => Proxy mods) ->
340+
logMessage . renderOneLineText $
341+
"Final term:" <+> pretty' @mods currentTerm
346342
throw $
347343
TooManyIterations currentCount startTerm currentTerm
348344
pushTerm currentTerm

0 commit comments

Comments
 (0)