From 8e61648693c779a411aad5ce8ad3a493e4032155 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 29 Sep 2022 14:10:04 -0400 Subject: [PATCH] * src/itree.c (interval_tree_iter_start): Improve error message --- src/itree.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/itree.c b/src/itree.c index aa6fcc1bea0..bdaa3fe09bb 100644 --- a/src/itree.c +++ b/src/itree.c @@ -438,7 +438,12 @@ interval_tree_iter_start (struct interval_tree *tree, const char* file, int line) { if (tree->iter_running) - emacs_abort (); + { + fprintf (stderr, + "Detected nested iteration!\nOuter: %s:%d\nInner: %s:%d\n", + tree->file, tree->line, file, line); + emacs_abort (); + } interval_generator_reset (tree->iter, begin, end, order); tree->iter_running = true; tree->file = file; -- 2.39.2