diff --git a/tests/testthat/_snaps/cnd-abort.md b/tests/testthat/_snaps/cnd-abort.md index ed9753b1d..9a583c9e0 100644 --- a/tests/testthat/_snaps/cnd-abort.md +++ b/tests/testthat/_snaps/cnd-abort.md @@ -101,8 +101,6 @@ Code cat_line(branch_depth_0) Output - Warning message: - package ‘rlang’ was built under R version 4.3.3 Error: ! foo Backtrace: @@ -111,8 +109,6 @@ Code cat_line(full_depth_0) Output - Warning message: - package ‘rlang’ was built under R version 4.3.3 Error: ! foo Backtrace: @@ -183,7 +179,7 @@ --- Backtrace: x - 1. +-rlang:::catch_error(f()) + 1. +-catch_error(f()) 2. | \-rlang::catch_cnd(expr, "error") 3. | +-rlang::eval_bare(...) 4. | +-base::tryCatch(...) @@ -191,9 +187,9 @@ 6. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 7. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 8. | \-base::force(expr) - 9. \-rlang (local) f() - 10. \-rlang (local) g() - 11. \-rlang (local) h() + 9. \-f() + 10. \-g() + 11. \-h() Code # From `last_error()` print(last_error()) @@ -204,7 +200,7 @@ --- Backtrace: x - 1. +-rlang:::catch_error(f()) + 1. +-catch_error(f()) 2. | \-rlang::catch_cnd(expr, "error") 3. | +-rlang::eval_bare(...) 4. | +-base::tryCatch(...) @@ -212,9 +208,9 @@ 6. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 7. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 8. | \-base::force(expr) - 9. \-rlang (local) f() - 10. \-rlang (local) g() - 11. \-rlang (local) h() + 9. \-f() + 10. \-g() + 11. \-h() Run rlang::last_trace(drop = FALSE) to see 1 hidden frame. Code # Saved from `last_error()` @@ -229,7 +225,7 @@ --- Backtrace: x - 1. +-rlang:::catch_error(f()) + 1. +-catch_error(f()) 2. | \-rlang::catch_cnd(expr, "error") 3. | +-rlang::eval_bare(...) 4. | +-base::tryCatch(...) @@ -237,9 +233,9 @@ 6. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 7. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 8. | \-base::force(expr) - 9. \-rlang (local) f() - 10. \-rlang (local) g() - 11. \-rlang (local) h() + 9. \-f() + 10. \-g() + 11. \-h() Run rlang::last_trace(drop = FALSE) to see 1 hidden frame. Code # Saved from `last_error()`, but no longer last @@ -254,7 +250,7 @@ --- Backtrace: x - 1. +-rlang:::catch_error(f()) + 1. +-catch_error(f()) 2. | \-rlang::catch_cnd(expr, "error") 3. | +-rlang::eval_bare(...) 4. | +-base::tryCatch(...) @@ -262,9 +258,9 @@ 6. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 7. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 8. | \-base::force(expr) - 9. \-rlang (local) f() - 10. \-rlang (local) g() - 11. \-rlang (local) h() + 9. \-f() + 10. \-g() + 11. \-h() Run rlang::last_trace(drop = FALSE) to see 1 hidden frame. # Backtrace on rethrow: stop() - tryCatch() @@ -281,7 +277,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -289,9 +285,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) Output @@ -304,7 +300,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -312,9 +308,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) Output @@ -327,7 +323,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -335,9 +331,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) Output @@ -350,7 +346,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -358,9 +354,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) # Backtrace on rethrow: stop() - withCallingHandlers() @@ -376,7 +372,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -384,13 +380,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::stop("low-level") Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) @@ -404,7 +400,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -412,13 +408,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::stop("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) @@ -432,7 +428,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -440,13 +436,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::stop("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) @@ -460,7 +456,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -468,13 +464,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::stop("low-level") # Backtrace on rethrow: stop() - try_fetch() @@ -491,7 +487,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -499,18 +495,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::stop("low-level") Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) @@ -524,7 +520,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -532,18 +528,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::stop("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) @@ -557,7 +553,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -565,18 +561,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::stop("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) @@ -590,7 +586,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -598,18 +594,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::stop("low-level") # Backtrace on rethrow: abort() - tryCatch() @@ -626,7 +622,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -634,16 +630,16 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::tryCatch(...) 14. | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 15. | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16. | \-base (local) doTryCatch(return(expr), name, parentenv, handler) - 17. \-rlang (local) low1() - 18. \-rlang (local) low2() - 19. \-rlang (local) low3() + 17. \-low1() + 18. \-low2() + 19. \-low3() Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) Output @@ -656,7 +652,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -664,16 +660,16 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::tryCatch(...) 14. | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 15. | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16. | \-base (local) doTryCatch(return(expr), name, parentenv, handler) - 17. \-rlang (local) low1() - 18. \-rlang (local) low2() - 19. \-rlang (local) low3() + 17. \-low1() + 18. \-low2() + 19. \-low3() Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) Output @@ -686,7 +682,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -694,16 +690,16 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::tryCatch(...) 14. | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 15. | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16. | \-base (local) doTryCatch(return(expr), name, parentenv, handler) - 17. \-rlang (local) low1() - 18. \-rlang (local) low2() - 19. \-rlang (local) low3() + 17. \-low1() + 18. \-low2() + 19. \-low3() Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) Output @@ -716,7 +712,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -724,16 +720,16 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::tryCatch(...) 14. | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 15. | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16. | \-base (local) doTryCatch(return(expr), name, parentenv, handler) - 17. \-rlang (local) low1() - 18. \-rlang (local) low2() - 19. \-rlang (local) low3() + 17. \-low1() + 18. \-low2() + 19. \-low3() # Backtrace on rethrow: abort() - withCallingHandlers() @@ -749,7 +745,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -757,13 +753,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) Output @@ -776,7 +772,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -784,13 +780,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) Output @@ -803,7 +799,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -811,13 +807,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) Output @@ -830,7 +826,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -838,13 +834,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() # Backtrace on rethrow: abort() - try_fetch() @@ -860,7 +856,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -868,18 +864,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) Output @@ -892,7 +888,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -900,18 +896,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) Output @@ -924,7 +920,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -932,18 +928,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) Output @@ -956,7 +952,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -964,18 +960,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() # Backtrace on rethrow: warn = 2 - tryCatch() @@ -991,7 +987,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -999,9 +995,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) Output @@ -1014,7 +1010,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1022,9 +1018,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) Output @@ -1037,7 +1033,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1045,9 +1041,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) Output @@ -1060,7 +1056,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1068,9 +1064,9 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) # Backtrace on rethrow: warn = 2 - withCallingHandlers() @@ -1086,7 +1082,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1094,13 +1090,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::warning("low-level") Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) @@ -1114,7 +1110,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1122,13 +1118,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::warning("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) @@ -1142,7 +1138,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1150,13 +1146,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::warning("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) @@ -1170,7 +1166,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1178,13 +1174,13 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-base::withCallingHandlers(...) - 14. \-rlang (local) low1() - 15. \-rlang (local) low2() - 16. \-rlang (local) low3() + 14. \-low1() + 15. \-low2() + 16. \-low3() 17. \-base::warning("low-level") # Backtrace on rethrow: warn = 2 - try_fetch() @@ -1201,7 +1197,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1209,18 +1205,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::warning("low-level") Code print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) @@ -1234,7 +1230,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = TRUE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = TRUE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = TRUE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1242,18 +1238,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = TRUE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = TRUE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::warning("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) @@ -1267,7 +1263,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = TRUE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = TRUE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = TRUE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1275,18 +1271,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = TRUE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = TRUE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::warning("low-level") Code print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) @@ -1300,7 +1296,7 @@ Backtrace: x 1. +-base::print(catch_error(high1(chain = FALSE, stop_helper = FALSE))) - 2. +-rlang:::catch_error(high1(chain = FALSE, stop_helper = FALSE)) + 2. +-catch_error(high1(chain = FALSE, stop_helper = FALSE)) 3. | \-rlang::catch_cnd(expr, "error") 4. | +-rlang::eval_bare(...) 5. | +-base::tryCatch(...) @@ -1308,18 +1304,18 @@ 7. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 9. | \-base::force(expr) - 10. \-rlang (local) high1(chain = FALSE, stop_helper = FALSE) - 11. \-rlang (local) high2(...) - 12. \-rlang (local) high3(...) + 10. \-high1(chain = FALSE, stop_helper = FALSE) + 11. \-high2(...) + 12. \-high3(...) 13. +-rlang::try_fetch(...) 14. | +-base::tryCatch(...) 15. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 16. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 17. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 18. | \-base::withCallingHandlers(...) - 19. \-rlang (local) low1() - 20. \-rlang (local) low2() - 21. \-rlang (local) low3() + 19. \-low1() + 20. \-low2() + 21. \-low3() 22. \-base::warning("low-level") # abort() displays call in error prefix @@ -1583,8 +1579,7 @@ Error: ! foo x bar - i This is an internal error that was detected in the rlang package. - Please report it at with a reprex () and the full backtrace. + i This is an internal error, please report it to the package authors. Code err(abort("foo", body = c(x = "bar"), .internal = TRUE)) Output @@ -1592,8 +1587,7 @@ Error: ! foo x bar - i This is an internal error that was detected in the rlang package. - Please report it at with a reprex () and the full backtrace. + i This is an internal error, please report it to the package authors. # setting `.internal` adds footer bullet (fallback) @@ -1604,8 +1598,7 @@ Error: ! foo x bar - i This is an internal error that was detected in the rlang package. - Please report it at with a reprex () and the full backtrace. + i This is an internal error, please report it to the package authors. Code err(abort("foo", body = c(x = "bar"), .internal = TRUE)) Output @@ -1613,8 +1606,7 @@ Error: ! foo x bar - i This is an internal error that was detected in the rlang package. - Please report it at with a reprex () and the full backtrace. + i This is an internal error, please report it to the package authors. # must pass character `body` when `message` is > 1 @@ -1700,8 +1692,7 @@ Error in `f()`: ! foo - i This is an internal error that was detected in the rlang package. - Please report it at with a reprex () and the full backtrace. + i This is an internal error, please report it to the package authors. Code err(abort("foo", footer = "bar", .internal = TRUE, call = quote(f()))) Output @@ -1728,16 +1719,16 @@ Backtrace: x 1. +-base::print(err(foo())) - 2. +-rlang:::err(foo()) + 2. +-err(foo()) 3. | \-testthat::expect_error(...) 4. | \-testthat:::expect_condition_matching(...) 5. | \-testthat:::quasi_capture(...) 6. | +-testthat (local) .capture(...) 7. | | \-base::withCallingHandlers(...) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 9. \-rlang (local) foo() - 10. \-rlang (local) bar() - 11. \-rlang (local) baz() + 9. \-foo() + 10. \-bar() + 11. \-baz() # if `call` is older than handler caller, use that as bottom @@ -1762,7 +1753,7 @@ 5. | +-testthat (local) .capture(...) 6. | | \-base::withCallingHandlers(...) 7. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 8. \-rlang (local) f() + 8. \-f() Code low_level <- (function(call) { abort("Tilt.", call = list(NULL, frame = call)) @@ -1784,7 +1775,7 @@ 5. | +-testthat (local) .capture(...) 6. | | \-base::withCallingHandlers(...) 7. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 8. \-rlang (local) f() + 8. \-f() # base causal errors include full user backtrace @@ -1806,15 +1797,15 @@ 5. | +-testthat (local) .capture(...) 6. | | \-base::withCallingHandlers(...) 7. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 8. +-rlang (local) my_verb(add(1, "")) - 9. | \-rlang (local) with_chained_errors(expr) + 8. +-my_verb(add(1, "")) + 9. | \-with_chained_errors(expr) 10. | \-rlang::try_fetch(...) 11. | +-base::tryCatch(...) 12. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 13. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 15. | \-base::withCallingHandlers(...) - 16. \-rlang (local) add(1, "") + 16. \-add(1, "") # can supply header method via `message` diff --git a/tests/testthat/_snaps/current/cnd-abort.md b/tests/testthat/_snaps/current/cnd-abort.md index 30630b86a..58cde79a2 100644 --- a/tests/testthat/_snaps/current/cnd-abort.md +++ b/tests/testthat/_snaps/current/cnd-abort.md @@ -18,14 +18,14 @@ 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 7. \-rlang (local) high1() - 8. \-rlang (local) high2() - 9. \-rlang (local) high3() - 10. +-rlang (local) wch(low1(), error = function(err) handler1(err)) + 7. \-high1() + 8. \-high2() + 9. \-high3() + 10. +-wch(low1(), error = function(err) handler1(err)) 11. | \-base::withCallingHandlers(expr, ...) - 12. \-rlang (local) low1() - 13. \-rlang (local) low2() - 14. \-rlang (local) low3() + 12. \-low1() + 13. \-low2() + 14. \-low3() Code summary(err) Output @@ -43,14 +43,14 @@ 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 7. \-rlang (local) high1() - 8. \-rlang (local) high2() - 9. \-rlang (local) high3() - 10. +-rlang (local) wch(low1(), error = function(err) handler1(err)) + 7. \-high1() + 8. \-high2() + 9. \-high3() + 10. +-wch(low1(), error = function(err) handler1(err)) 11. | \-base::withCallingHandlers(expr, ...) - 12. \-rlang (local) low1() - 13. \-rlang (local) low2() - 14. \-rlang (local) low3() + 12. \-low1() + 13. \-low2() + 14. \-low3() --- @@ -72,14 +72,14 @@ 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 7. \-rlang (local) high1() - 8. \-rlang (local) high2() - 9. \-rlang (local) high3() - 10. +-rlang (local) wch(low1(), error = function(err) handler1(err)) + 7. \-high1() + 8. \-high2() + 9. \-high3() + 10. +-wch(low1(), error = function(err) handler1(err)) 11. | \-base::withCallingHandlers(expr, ...) - 12. \-rlang (local) low1() - 13. \-rlang (local) low2() - 14. \-rlang (local) low3() + 12. \-low1() + 13. \-low2() + 14. \-low3() 15. \-rlang (local) fail(NULL, "Low-level message") Code summary(err) @@ -98,14 +98,14 @@ 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 7. \-rlang (local) high1() - 8. \-rlang (local) high2() - 9. \-rlang (local) high3() - 10. +-rlang (local) wch(low1(), error = function(err) handler1(err)) + 7. \-high1() + 8. \-high2() + 9. \-high3() + 10. +-wch(low1(), error = function(err) handler1(err)) 11. | \-base::withCallingHandlers(expr, ...) - 12. \-rlang (local) low1() - 13. \-rlang (local) low2() - 14. \-rlang (local) low3() + 12. \-low1() + 13. \-low2() + 14. \-low3() 15. \-rlang (local) fail(NULL, "Low-level message") # `parent = NA` signals a non-chained rethrow @@ -126,23 +126,23 @@ Backtrace: x 1. +-base::print(err(ff())) - 2. +-rlang:::err(ff()) + 2. +-err(ff()) 3. | \-testthat::expect_error(...) 4. | \-testthat:::expect_condition_matching(...) 5. | \-testthat:::quasi_capture(...) 6. | +-testthat (local) .capture(...) 7. | | \-base::withCallingHandlers(...) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 9. +-rlang (local) ff() - 10. | \-rlang (local) gg() - 11. | \-rlang (local) hh() + 9. +-ff() + 10. | \-gg() + 11. | \-hh() 12. | +-base::withCallingHandlers(...) - 13. | \-rlang (local) foo() - 14. | \-rlang (local) bar() - 15. | \-rlang (local) baz() + 13. | \-foo() + 14. | \-bar() + 15. | \-baz() 16. | \-base::stop("bar") 17. \-base::.handleSimpleError(``, "bar", base::quote(baz())) - 18. \-rlang (local) h(simpleError(msg, call)) + 18. \-h(simpleError(msg, call)) Code # Missing parent allows correct trace bottom hh <- (function() { @@ -159,20 +159,20 @@ Backtrace: x 1. +-base::print(err(ff())) - 2. +-rlang:::err(ff()) + 2. +-err(ff()) 3. | \-testthat::expect_error(...) 4. | \-testthat:::expect_condition_matching(...) 5. | \-testthat:::quasi_capture(...) 6. | +-testthat (local) .capture(...) 7. | | \-base::withCallingHandlers(...) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 9. \-rlang (local) ff() - 10. \-rlang (local) gg() - 11. \-rlang (local) hh() + 9. \-ff() + 10. \-gg() + 11. \-hh() 12. +-base::withCallingHandlers(...) - 13. \-rlang (local) foo() - 14. \-rlang (local) bar() - 15. \-rlang (local) baz() + 13. \-foo() + 14. \-bar() + 15. \-baz() 16. \-base::stop("bar") Code # Wrapped handler @@ -190,20 +190,20 @@ Backtrace: x 1. +-base::print(err(ff())) - 2. +-rlang:::err(ff()) + 2. +-err(ff()) 3. | \-testthat::expect_error(...) 4. | \-testthat:::expect_condition_matching(...) 5. | \-testthat:::quasi_capture(...) 6. | +-testthat (local) .capture(...) 7. | | \-base::withCallingHandlers(...) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 9. \-rlang (local) ff() - 10. \-rlang (local) gg() - 11. \-rlang (local) hh() + 9. \-ff() + 10. \-gg() + 11. \-hh() 12. +-base::withCallingHandlers(foo(), error = function(cnd) handler1(cnd)) - 13. \-rlang (local) foo() - 14. \-rlang (local) bar() - 15. \-rlang (local) baz() + 13. \-foo() + 14. \-bar() + 15. \-baz() 16. \-base::stop("bar") Code # Wrapped handler, `try_fetch()` @@ -219,25 +219,25 @@ Backtrace: x 1. +-base::print(err(ff())) - 2. +-rlang:::err(ff()) + 2. +-err(ff()) 3. | \-testthat::expect_error(...) 4. | \-testthat:::expect_condition_matching(...) 5. | \-testthat:::quasi_capture(...) 6. | +-testthat (local) .capture(...) 7. | | \-base::withCallingHandlers(...) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 9. \-rlang (local) ff() - 10. \-rlang (local) gg() - 11. \-rlang (local) hh() + 9. \-ff() + 10. \-gg() + 11. \-hh() 12. +-rlang::try_fetch(foo(), error = function(cnd) handler1(cnd)) 13. | +-base::tryCatch(...) 14. | | \-base (local) tryCatchList(expr, classes, parentenv, handlers) 15. | | \-base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16. | | \-base (local) doTryCatch(return(expr), name, parentenv, handler) 17. | \-base::withCallingHandlers(...) - 18. \-rlang (local) foo() - 19. \-rlang (local) bar() - 20. \-rlang (local) baz() + 18. \-foo() + 19. \-bar() + 20. \-baz() 21. \-base::stop("bar") Code # Wrapped handler, incorrect `call` @@ -253,19 +253,19 @@ Backtrace: x 1. +-base::print(err(ff())) - 2. +-rlang:::err(ff()) + 2. +-err(ff()) 3. | \-testthat::expect_error(...) 4. | \-testthat:::expect_condition_matching(...) 5. | \-testthat:::quasi_capture(...) 6. | +-testthat (local) .capture(...) 7. | | \-base::withCallingHandlers(...) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) - 9. \-rlang (local) ff() - 10. \-rlang (local) gg() - 11. \-rlang (local) hh() + 9. \-ff() + 10. \-gg() + 11. \-hh() 12. +-base::withCallingHandlers(foo(), error = handler1) - 13. \-rlang (local) foo() - 14. \-rlang (local) bar() - 15. \-rlang (local) baz() + 13. \-foo() + 14. \-bar() + 15. \-baz() 16. \-base::stop("bar")