Hi All, I didn't receive a mail from moderator that my post is pending for review, hence sending once again.
Please suggest, I got answer from Stack overflow but somehow couldn't get it implemented, if anyone of you can suggest how try catch can be implemented in this case. Thanks again! Best Regards, Archit ---------- Forwarded message ---------- From: Archit Soni <soni.archit1...@gmail.com> Date: Tue, Dec 22, 2015 at 6:34 AM Subject: Trycatch in R To: r-help@r-project.org Hi All, Please help me in the below code: tryCatch({ x <- capture.output(XML::xmlParse(y)) }, warning = function(w) { x <- capture.output(w) }, error = function(e) { x <-capture.output(e) }, finally = { }) I am using Tibco Enterprise Runtime for R to get value of the parsed XML in vector format, and spotfire is displaying each line as a row in new table, but can you please suggest how to do error handling in this case when no row is selected and we run this script, it is throwing error for length of argument is 0, i need to display an error message as first row of the table. Please suggest. -- Regards Archit -- Regards Archit [[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.