Last active
August 29, 2015 14:08
-
-
Save Dulani/aef1a6ba9b075eae533e to your computer and use it in GitHub Desktop.
R: A working example with tryCatch() that takes action on bad data and then throws a warning.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parsedXml <- tryCatch( ParseAlert(xmlParse(alert.xml)), | |
error = function(e){ warning(paste("Problem encountered parsing alert XML for:",curMsgID,continuing)); | |
warning(geterrmessage()); | |
data.frame(NA) | |
return(NA) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment