Skip to content

Commit

Permalink
add debug option with option freesurferformats.debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsp-spirit committed Jan 26, 2022
1 parent 9368534 commit e3b39e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/read_fs_annot.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#' @export
read.fs.annot <- function(filepath, empty_label_name="empty", metadata=list(), default_label_name="") {

if(getOption("freesurferformats.debug", default=0) >= 2) {
cat(sprintf("Handling annot file '%s'.\n", filepath));
}

if(! file.exists(filepath)) {
stop(sprintf("Annotation file '%s' does not exist or cannot be read.\n", filepath));
}
Expand Down

0 comments on commit e3b39e3

Please sign in to comment.