Repository navigation
Conversation
❌ 2 of 5 checks failed
Tested against Logs: Devtools checks · Code quality · Armadillo unit tests · Opal unit tests · Codecov |
| } | ||
|
|
||
| return(list(validity.message=validity.message,error.messages=error.messages)) | ||
| failures <- paste0(names(error.messages), ": ", unlist(error.messages)) |
| if(is.null(df)){ | ||
| cli_abort("Please provide the name of a data.frame or matrix!") | ||
| .checkArgsSet <- function(..., call = parent.frame()) { | ||
| args <- list(...) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note still draft - I need to finish this prior to review.
Aim of this PR is to refactor error message handling such that, where possible, helper functions handle errors (e.g. argument checks). This means we can then specify the wording in a small number of places and reuse across the package, rather than repeating in every function. This will increase consistency and also maintainability, as if we ever want to change the wording we only need to do it in one place.
This PR does the refactor, the next PR will update the error message handling to use CLI, which gives a more professional look