Skip to content

Commit

Permalink
fetchNASIS("components")/fetchVegdata: more informative error for emp…
Browse files Browse the repository at this point in the history
…ty selected set
  • Loading branch information
brownag committed Dec 3, 2024
1 parent f3f1a38 commit 1c15921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/fetchNASIS_components.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
}

} else {
stop("No horizon data in NASIS component query result.", call. = FALSE)
ds <- ifelse(SS, "NASIS selected set", "NASIS local database")
stop("No component/horizon records in ", ds, call. = FALSE)
}

# add site data to object
Expand Down
2 changes: 1 addition & 1 deletion R/get_vegplot_data_from_NASIS_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ get_vegplot_from_NASIS_db <- function(SS = TRUE,
# test for no data
if (nrow(d.vegplot) == 0) {
ds <- ifelse(SS, "NASIS selected set", "NASIS local database")
stop('No NASIS Site+Vegetation Plot records in ', ds, '!', call. = FALSE)
stop('No NASIS site/vegetation plot records in ', ds, call. = FALSE)
}
# uncode metadata domains
d <- uncode(d.vegplot, dsn = dsn)
Expand Down

0 comments on commit 1c15921

Please sign in to comment.