ropensci/rsnps

Add error messages

Opened this issue · 0 comments

Problem: Several functions could profit from error messages.

Example:

rsnps::allgensnp(snp = "rs1528723")
#> Error: Not Found (HTTP 404)

Created on 2019-05-07 by the reprex package (v0.2.1)

rsnps::download_users(id = "Sullivan") ## Sullivan is only a partial name
#> Error in strsplit(fileurl, "/")[[1]]: subscript out of bounds
## - better error message for sullivan:  Error in strsplit(fileurl, "/")[[1]] : subscript out of bounds

Created on 2019-05-07 by the reprex package (v0.2.1)

Solution: error("ERROR MESSAGE") (see also dev guide section and Advanced R section)