Skip to content

Commit

Permalink
Forbid registration of readers for existing types.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Nov 20, 2023
1 parent d9f16f1 commit 48d7a42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/readObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,11 @@ readObjectFunctionRegistry <- function() {
#' @rdname readObject
registerReadObjectFunction <- function(type, fun) {
if (!is.null(fun) && !is.null(read.registry$registry[[type]])) {
warning("readObject function has already been registered for object type '", type, "'")
stop("readObject function has already been registered for object type '", type, "'")
}
read.registry$registry[[type]] <- fun
}


#######################################
########### OLD STUFF HERE ############
#######################################
Expand Down

0 comments on commit 48d7a42

Please sign in to comment.