Skip to content

Commit

Permalink
Add 'call' fields to the conditions signaled in .Deprecated and .Defu…
Browse files Browse the repository at this point in the history
…nct.

git-svn-id: https://svn.r-project.org/R/trunk@85870 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
luke committed Feb 6, 2024
1 parent d7d3925 commit 3b87d0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/library/base/R/Defunct.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File src/library/base/R/Defunct.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2023 The R Core Team
# Copyright (C) 1995-2024 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -33,7 +33,8 @@

if (missing(new)) new <- NULL
stop(errorCondition(msg, old = fname, new = new, package = package,
class = "defunctError"))
class = "defunctError",
call = sys.call(sys.parent())))
}

## Version <- function() .Defunct("R.Version")
Expand Down
3 changes: 2 additions & 1 deletion src/library/base/R/Deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

if (missing(new)) new <- NULL
warning(warningCondition(msg, old = old, new = new, package = package,
class = "deprecatedWarning"))
class = "deprecatedWarning",
call = sys.call(sys.parent())))
}

## consider keeping one (commented) entry here, for easier additions
Expand Down

0 comments on commit 3b87d0a

Please sign in to comment.