Skip to content

Commit 1c15921

Browse files
committed
fetchNASIS("components")/fetchVegdata: more informative error for empty selected set
1 parent f3f1a38 commit 1c15921

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

R/fetchNASIS_components.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
}
104104

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

109110
# add site data to object

R/get_vegplot_data_from_NASIS_db.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ get_vegplot_from_NASIS_db <- function(SS = TRUE,
6868
# test for no data
6969
if (nrow(d.vegplot) == 0) {
7070
ds <- ifelse(SS, "NASIS selected set", "NASIS local database")
71-
stop('No NASIS Site+Vegetation Plot records in ', ds, '!', call. = FALSE)
71+
stop('No NASIS site/vegetation plot records in ', ds, call. = FALSE)
7272
}
7373
# uncode metadata domains
7474
d <- uncode(d.vegplot, dsn = dsn)

0 commit comments

Comments
 (0)