Skip to content

Commit 6832a8e

Browse files
committed
Use withCallingHandlers() for performance
1 parent a09c467 commit 6832a8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/parse.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#'
1616
#' styler:::parse_safely("a + 3 -4 -> \n glück + 1")
1717
parse_safely <- function(text, ...) {
18-
tried_parsing <- rlang::try_fetch(
18+
tried_parsing <- withCallingHandlers(
1919
parse(text = text, ...),
2020
error = function(e) {
2121
if (has_crlf_as_first_line_sep(e$message, text)) {

0 commit comments

Comments
 (0)