Skip to content

Commit

Permalink
Improved error message
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Funk <[email protected]>
  • Loading branch information
jamesmbaazam and sbfnk committed Sep 2, 2023
1 parent 8ed354b commit 6edb2d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/epichains.R
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ aggregate.epichains <- function(x,
validate_epichains(x)
# Check that the object is of type "chains_tree"
if (!is_chains_tree(x)) {
stop("object must be an epichains object with 'chains_tree' attribute.")
stop(
"object must be an epichains object with 'chains_tree' attribute, ",
"which can be generated using the `simulate_tree()` function."
)
}

# Get grouping variable
Expand Down

0 comments on commit 6edb2d7

Please sign in to comment.