From b340de9a70f13e733adcecfa5acbca226017061f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu>
Date: Sat, 2 May 2020 06:55:26 +0200
Subject: [PATCH] Clearer error messages

* R/api.R(vrfy_conf): Clearer file.exist messages.
---
 R/api.R | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/R/api.R b/R/api.R
index e7569cb..02d9552 100644
--- a/R/api.R
+++ b/R/api.R
@@ -128,13 +128,13 @@ vrfy_conf <- function(conf) {
     all_sets<-unique(df_sets$set)
 
     fn_data <- conf$data
-    assertthat::assert_that(file.exists(fn_data),msg=paste("Data table cannot be read:",fn_data))
+    assertthat::assert_that(file.exists(fn_data),msg=paste("Data table does not exist:",fn_data))
     mzml <- file2tab(fn_data)
     
     no_files <- which(mzml[,!file.exists(Files)])
     no_modes <- which(mzml[,!(mode %in% names(MODEMAP))])
     no_sets <- which(mzml[,!(set %in% all_sets)])
-    assertthat::assert_that(length(no_files)==0,msg = paste("Unreadable data files at rows:",paste(no_files,collapse = ','), "of",fn_data))
+    assertthat::assert_that(length(no_files)==0,msg = paste("Non-existent data files at rows:",paste(no_files,collapse = ','), "of",fn_data))
     assertthat::assert_that(length(no_modes)==0,msg = paste("Unrecognised modes at rows:",paste(no_modes,collapse = ','), "of", fn_data))
     assertthat::assert_that(length(no_sets)==0,msg = paste("Unknown sets at rows:",paste(no_sets,collapse = ','),"of", fn_data))
 
-- 
GitLab