Skip to content

Bug: Errors generated by "try" will not be reported #175

@weistg0105

Description

@weistg0105

What happened?

Errors generated by "try" will not be reported in the logrx report, see example below.

Session Information

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server x64 (build 20348)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gt_0.9.0 checkmate_2.1.0 lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 dplyr_1.1.1 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0
[10] tibble_3.2.1 ggplot2_3.4.1 tidyverse_2.0.0 logrx_0.2.1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.10 waiter_0.2.5 ps_1.7.2 rprojroot_2.0.3 digest_0.6.31 utf8_1.2.3 mime_0.12 R6_2.5.1
[9] backports_1.4.1 evaluate_0.20 pillar_1.8.1 rlang_1.1.0 lazyeval_0.2.2 rstudioapi_0.14 miniUI_0.1.1.1 callr_3.7.3
[17] rmarkdown_2.20 desc_1.4.2 munsell_0.5.0 shiny_1.7.4 compiler_4.2.2 httpuv_1.6.8 lintr_3.0.2 xfun_0.37
[25] pkgconfig_2.0.3 htmltools_0.5.4 tcltk_4.2.2 tidyselect_1.2.0 fansi_1.0.4 crayon_1.5.2 tzdb_0.3.0 withr_2.5.0
[33] later_1.3.0 commonmark_1.8.1 grid_4.2.2 xtable_1.8-4 gtable_0.3.1 lifecycle_1.0.3 magrittr_2.0.3 scales_1.2.1
[41] cli_3.6.0 stringi_1.7.12 fs_1.6.1 promises_1.2.0.1 remotes_2.4.2 rex_1.2.1 xml2_1.3.3 ellipsis_0.3.2
[49] generics_0.1.3 vctrs_0.6.1 cyclocomp_1.1.0 tools_4.2.2 glue_1.6.2 markdown_1.5 hms_1.1.2 processx_3.8.0
[57] fastmap_1.1.0 timechange_0.2.0 colorspace_2.1-0 sessioninfo_1.2.2 knitr_1.42 sass_0.4.5

Reproducible Example

Script

try(log("A"))
try(log("B"))
try(log("C"))
stop("That's an error generated by stop.")

Console

Error in log("A") : non-numeric argument to mathematical function
Error in log("B") : non-numeric argument to mathematical function
Error in log("C") : non-numeric argument to mathematical function
Error: That's an error generated by stop.

logrx Report:

...

  •                         Errors and Warnings                              -
    

Errors:
That's an error generated by stop.

Warnings:


  •                     Messages, Output, and Result                         -
    

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions