Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. stop <- function(..., call. = FALSE, domain = NULL){
  2. base::stop(..., call. = call., domain = domain);
  3. }
  4.  
  5. > stop(simpleError("foo"))
  6. Error: foo
  7. In addition: Warning message:
  8. In base::stop(..., call. = call., domain = domain) :
  9. additional arguments ignored in stop()
  10.  
  11. if (length(args) == 1L && inherits(args[[1L]], "condition")) {
  12. ....
  13. if (nargs() > 1L) # give the warning
  14.  
  15. stop(simpleError('achtung!'))
  16. # Error: achtung!
  17. stop(simpleError('achtung!'), call.=F) # gives the warning
  18. # Error: achtung!
  19. # In addition: Warning message:
  20. # In stop(simpleError("achtung!"), call. = F) :
  21. # additional arguments ignored in stop()
  22. stop(simpleError('achtung!', call=call('f')))
  23. # Error in f() : achtung!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement