Skip to content

Commit

Permalink
Fix error messages incorrectly referencing function upgrade_version()…
Browse files Browse the repository at this point in the history
… to correctly reference upgrade_graph()
  • Loading branch information
louisaslett authored and aviator-bot committed Feb 20, 2024
1 parent 7fed4c8 commit 9ba1888
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/rinterface_extra.c
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,7 @@ igraph_t *R_igraph_get_pointer(SEXP graph) {
if (Rf_xlength(graph) == 11) {
Rf_error("This graph was created by igraph < 0.2.\n Upgrading this format is not supported, sorry.");
}
Rf_error("This graph was created by a now unsupported old igraph version.\n Call upgrade_version() before using igraph functions on that object.");
Rf_error("This graph was created by a now unsupported old igraph version.\n Call upgrade_graph() before using igraph functions on that object.");
}

SEXP xp=Rf_findVar(Rf_install("igraph"), R_igraph_graph_env(graph));
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/old-data-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

12 changes: 6 additions & 6 deletions tests/testthat/_snaps/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

# we can't upgrade from 0.5 to 1.5.0, on the fly

Expand All @@ -31,7 +31,7 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

# we can't upgrade from 0.6 to 1.5.0, on the fly

Expand All @@ -40,7 +40,7 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

# we can upgrade from 1.0.0 to 1.5.0, on the fly

Expand Down Expand Up @@ -81,7 +81,7 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

---

Expand All @@ -90,7 +90,7 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

---

Expand All @@ -99,7 +99,7 @@
Condition
Error in `warn_version()`:
! This graph was created by a now unsupported old igraph version.
Call upgrade_version() before using igraph functions on that object.
Call upgrade_graph() before using igraph functions on that object.

---

Expand Down

0 comments on commit 9ba1888

Please sign in to comment.