[Rd] WISH: A more informative abor message than "aborting ..."
Henrik Bengtsson
henrik.bengtsson at ucsf.edu
Wed May 13 02:17:22 CEST 2015
When R aborts ("core dumps"), it outputs:
"aborting ..."
This message is rather generic and can be hard to track back to R
itself, i.e. it is not always clear whether it is R itself that
aborted or some other piece of code that caused the abort/core dump
and outputted that message.
May I suggest to expand the message to clarify that it is R that
aborts and that make it explicit that it is the very last message that
is generated by R, e.g.
"An exception occurred that R could not recover from. The R session
is now aborting ..."
The code that needs to be updated is in
https://svn.r-project.org/R/trunk/src/main/main.c. Here's a patch for
the above suggestion:
$ svn diff src/main/main.c
Index: src/main/main.c
===================================================================
--- src/main/main.c (revision 68355)
+++ src/main/main.c (working copy)
@@ -594,7 +594,7 @@
}
}
}
- REprintf("aborting ...\n");
+ REprintf("An exception occurred that R could not recover from.
The R session is now aborting ...\n");
R_CleanTempDir();
/* now do normal behaviour, e.g. core dump */
signal(signum, SIG_DFL);
FYI, after signal(), raise(signum) is called and I think that's it from R.
Thanks,
Henrik
More information about the R-devel
mailing list