Skip to content

Commit

Permalink
Make error message slightly more informative
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Feb 21, 2024
1 parent 6b730e9 commit edde2a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/translate-sql.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ sql_data_mask <- function(expr,
if (env_has(special_calls2, name) || env_has(special_calls, name)) {
env_get(special_calls2, name, inherit = TRUE)
} else {
cli_abort("No known translation", call = call2(call2("::", sym(pkg), sym(name))))
cli_abort("No known SQL translation", call = call2(call2("::", sym(pkg), sym(name))))
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/translate-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
test_translate_sql(base::abbreviate(x))
Condition
Error in `base::abbreviate()`:
! No known translation
! No known SQL translation

---

Expand All @@ -45,5 +45,5 @@
lz %>% mutate(x = base::abbreviate(x))
Condition
Error in `base::abbreviate()`:
! No known translation
! No known SQL translation

0 comments on commit edde2a6

Please sign in to comment.