Skip to content

Commit 5453641

Browse files
committed
Log full backtrace on diagnostic and formatting crashes
1 parent c2a2dbb commit 5453641

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/ruby_lsp/server.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,10 @@ def text_document_formatting(message)
674674
"Formatting error: #{error.message}",
675675
type: Constant::MessageType::ERROR,
676676
))
677+
send_message(Notification.window_log_message(
678+
"Formatting failed with\r\n: #{error.full_message}",
679+
type: Constant::MessageType::ERROR,
680+
))
677681
send_empty_response(message[:id])
678682
end
679683

@@ -919,6 +923,10 @@ def text_document_diagnostic(message)
919923
"Error running diagnostics: #{error.message}",
920924
type: Constant::MessageType::ERROR,
921925
))
926+
send_message(Notification.window_log_message(
927+
"Diagnostics failed with\r\n: #{error.full_message}",
928+
type: Constant::MessageType::ERROR,
929+
))
922930
send_empty_response(message[:id])
923931
end
924932

0 commit comments

Comments
 (0)