Skip to content

Commit

Permalink
Better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed May 16, 2023
1 parent eca0a0d commit efc8bec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions R/versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ check_version <- function(graph) {
}

warn_version <- function(graph) {
# Calling for side effect: error if R_SEXP_to_igraph() fails
vcount_impl(graph)

if (graph_version() != graph_version(graph)) {
message(
"This graph was created by an old(er) igraph version.\n",
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/_snaps/old-data-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

Code
V(karate)
Message <simpleMessage>
This graph was created by an old(er) igraph version.
Call upgrade_graph() on it to use with the current igraph version
For now we convert it on the fly...
Error <simpleError>
This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Expand Down

0 comments on commit efc8bec

Please sign in to comment.