From cb97548984c1fe52d62f7509811a215bbc2eb3d6 Mon Sep 17 00:00:00 2001 From: Andrea Manica Date: Thu, 27 Jun 2024 14:38:15 +0100 Subject: [PATCH] More debug information for worldclim --- R/download_worldclim_present.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/download_worldclim_present.R b/R/download_worldclim_present.R index a0ac0d14..f0c79f51 100644 --- a/R/download_worldclim_present.R +++ b/R/download_worldclim_present.R @@ -84,11 +84,13 @@ download_worldclim_present <- function(dataset, bio_var, filename) { time_bp = FALSE) if (!edit_res){ file.remove(vrt_path) - stop("something went wrong setting up this dataset", "\n the dataset will need downloading again") + stop("something went wrong setting up this dataset (", vrt_path," could not be created correctly)", + "\n the dataset will need downloading again") } } if (!file.exists(filename)){ - stop("something went wrong setting up this dataset", "\n the dataset will need downloading again") + stop("something went wrong setting up this dataset (", filename," is missing)", + "\n the dataset will need downloading again") } return(TRUE)