From: Stefan Monnier Date: Thu, 29 Sep 2022 18:10:04 +0000 (-0400) Subject: * src/itree.c (interval_tree_iter_start): Improve error message X-Git-Tag: emacs-29.0.90~1616^2~406^2~50 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e61648693c779a411aad5ce8ad3a493e4032155;p=emacs.git * src/itree.c (interval_tree_iter_start): Improve error message --- 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;