]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/itree.c (interval_tree_iter_start): Improve error message
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 29 Sep 2022 18:10:04 +0000 (14:10 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 29 Sep 2022 18:10:04 +0000 (14:10 -0400)
src/itree.c

index aa6fcc1bea08d7b970cbb7ff1e9458e92561dabd..bdaa3fe09bbb47f0e111a341bd9ae1edfe26945c 100644 (file)
@@ -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;