Skip to content

Commit 02e21dc

Browse files
committed
Catch warnings during certificate creation
1 parent 3dd9fda commit 02e21dc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

R/create_certificate.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ create_batch_certificates <- function(
192192
"i" = paste(" Error:", e$message)
193193
)
194194
)
195+
},
196+
warning = function(w) {
197+
cli::cli_inform(
198+
c(
199+
"!" = "Warning while creating certificate for {.val {paste(first_name, last_name)}}",
200+
"i" = paste(" Warning:", w$message)
201+
)
202+
)
195203
}
196204
)
197205
}
@@ -248,6 +256,14 @@ create_batch_pathways_certificates <- function(
248256
"i" = paste(" Error:", e$message)
249257
)
250258
)
259+
},
260+
warning = function(w) {
261+
cli::cli_inform(
262+
c(
263+
"!" = "Warning while creating certificate for {.val {name}}",
264+
"i" = paste(" Warning:", w$message)
265+
)
266+
)
251267
}
252268
)
253269
}

0 commit comments

Comments
 (0)