> # Interactive
> cat_line(interactive)
Error: bar
Run `rlang::last_error()` to see where the error occurred.
Execution halted

> # Non-interactive
> cat_line(non_interactive)
Error: bar
Backtrace:
     x
  1. \-global::a()
  2.   \-global::b()
  3.     \-global::c()
  4.       +-base::tryCatch(...)
  5.       | \-base:::tryCatchList(expr, classes, parentenv, handlers)
  6.       |   \-base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7.       |     \-base:::doTryCatch(return(expr), name, parentenv, handler)
  8.       \-global::f()
  9.         \-global::g()
 10.           \-global::h()
Execution halted

