lean4-htt/tests/lean/run/5565.lean
Eric Wieser b814be6d6a
fix: use MessageData.tagged to mark maxHeartbeat exceptions (#5566)
Fixes #5565, by using tags instead of trying to string match on a
`MessageData`. This ends up reverting some unwanted test output changes
from #4781 too.

This changes `isMaxRecDepth` for good measure too.

This was a regression in Lean 4.11.0, so may be worth backporting to
4.12.x, if not also 4.11.x.
2024-10-09 02:08:50 +00:00

9 lines
246 B
Text

import Lean.Elab.Command
run_meta do
Lean.tryCatchRuntimeEx
(do
Lean.Core.throwMaxHeartbeat `foo `bar 200)
(fun e =>
unless e.isMaxHeartbeat do
throwError "Not a max heartbeat error:{Lean.indentD e.toMessageData}")