File tree 3 files changed +9
-7
lines changed
crates/ark/src/lsp/modules
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 16
16
"cmake.configureOnOpen" : false ,
17
17
"rust-analyzer.showUnlinkedFileNotification" : false ,
18
18
"files.insertFinalNewline" : true ,
19
- "files.trimFinalNewlines" : true
19
+ "files.trimFinalNewlines" : true ,
20
+ "files.trimTrailingWhitespace" : true ,
21
+ "diffEditor.ignoreTrimWhitespace" : false
20
22
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ handle_error_base <- function(cnd) {
49
49
traceback <- lapply(traceback , function (lines ) paste0(lines , collapse = " \n " ))
50
50
traceback <- as.character(traceback )
51
51
traceback <- paste0(traceback , srcrefs )
52
-
52
+
53
53
.ps.Call(" ps_record_error" , evalue , traceback )
54
54
}
55
55
@@ -120,7 +120,7 @@ path_trim_prefix <- function(path, n) {
120
120
handle_error_rlang <- function (cnd ) {
121
121
evalue <- rlang :: cnd_message(cnd , prefix = TRUE )
122
122
traceback <- cnd $ trace
123
-
123
+
124
124
if (is.null(traceback )) {
125
125
traceback <- character ()
126
126
} else if (rlang :: trace_length(traceback ) == 0L ) {
Original file line number Diff line number Diff line change 15
15
16
16
# Unregister all handlers and hold onto them
17
17
handlers <- globalCallingHandlers(NULL )
18
-
18
+
19
19
# Inject our global error handler at the end.
20
20
# This allows other existing error handlers to run ahead of us.
21
21
handlers <- c(handlers , list (error = .ps.errors.globalErrorHandler ))
27
27
invisible (NULL )
28
28
}
29
29
30
- .ps.errors.globalErrorHandler <- function (cnd ) {
30
+ .ps.errors.globalErrorHandler <- function (cnd ) {
31
31
if (! is_installed(" rlang" )) {
32
32
# rlang is not installed, no option except to use the base handler
33
33
return (handle_error_base(cnd ))
36
36
# We have a non-rlang error, but the user requested we dont entrace it
37
37
return (handle_error_base(cnd ))
38
38
}
39
-
39
+
40
40
if (! inherits(cnd , " rlang_error" )) {
41
41
cnd <- rlang :: catch_cnd(rlang :: entrace(cnd ))
42
42
}
43
-
43
+
44
44
handle_error_rlang(cnd )
45
45
}
You can’t perform that action at this time.
0 commit comments