From aa5e2aa5f0ec96121b8c2117271efe082ed1bc9d Mon Sep 17 00:00:00 2001 From: Taiki Date: Fri, 8 Dec 2023 18:14:34 -0800 Subject: [PATCH] adding error catcher for debugging --- devel/matchTemplateFunctions.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devel/matchTemplateFunctions.R b/devel/matchTemplateFunctions.R index ee664fd..a0abc1e 100644 --- a/devel/matchTemplateFunctions.R +++ b/devel/matchTemplateFunctions.R @@ -7,7 +7,10 @@ loadTemplateBinary <- function(x, names, columns) { if(length(bin$data) == 0) { return(NULL) } - bin <- suppressWarnings(pbToDf(bin, templateNames=names)[columns]) + bin <- try(suppressWarnings(pbToDf(bin, templateNames=names)[columns])) + if(inherits(bin, 'try-error')) { + stop('Problem loading binary file ', x) + } bin$UID <- as.character(bin$UID) bin$BinaryFile <- basename(x) bin$date <- convertPgDate(bin$date)