curlError =
function(type, msg, asError = TRUE)
{
if(!is.character(type)) {
i = match(type, CURLcodeValues)
typeName = if(is.na(i))
character()
else
names(CURLcodeValues)[i]
}
typeName = gsub("^CURLE_", "", typeName)
fun = (if(asError) stop else warning)
fun( structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", if(asError) "error" else "warning", "condition")) )
}
getCurlErrorClassNames =
function()
{
gsub("^CURLE_", "", names(CURLcodeValues))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.