Folks: Consider the following two use cases:
goodfunction <- function() { stop("Something went wrong..." } # vs. badfunction <- function() { notgood() } Is there a way for me to test if the functions make use of a stop() statement WITHOUT modifying the stop() output (assume I can't mod the function containing the stop() statement itself)? For "goodfunction" the answer is TRUE, for "badfunction" the answer is FALSE. Both return an error, but only one does it "safely". I thought the answer might lie in a tryCatch statement but I'm having a hard time figuring out how to do this test. --j -- -- Jonathan A. Greenberg, PhD Randall Endowed Professor and Associate Professor of Remote Sensing Global Environmental Analysis and Remote Sensing (GEARS) Laboratory Natural Resources & Environmental Science University of Nevada, Reno 1664 N Virginia St MS/0186 Reno, NV 89557 Phone: 415-763-5476 http://www.unr.edu/nres Gchat: jgrn...@gmail.com, Skype: jgrn3007 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.