stopaste {W4MRUtils}R Documentation

stopaste - to paste string to a message and stop

Description

stopaste calls paste of its parameters to build the error message and stops with the given message

Usage

stopaste(...)

Arguments

...

Arguments passed on to base::paste

sep

a character string to separate the terms. Not NA_character_.

collapse

an optional character string to separate the results. Not NA_character_.

recycle0

logical indicating if zero-length character arguments should lead to the zero-length character(0) after the sep-phase (which turns into "" in the collapse-phase, i.e., when collapse is not NULL).

Author(s)

L.Pavot

Examples


tryCatch({
  file <- "/tmp/test"
  stopaste("Error in file: ", file)
}, error = function(error) {
  print(error)
})


[Package W4MRUtils version 1.0.0 Index]