Skip to content

Commit f41feb7

Browse files
committed
Don’t fatalError if applying an edit in sourcekitd fails
1 parent cb14bd0 commit f41feb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageService.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,12 @@ extension SwiftLanguageService {
518518
do {
519519
_ = try await self.sourcekitd.send(req, fileContents: nil)
520520
} catch {
521-
fatalError("failed to apply edit")
521+
logger.fault(
522+
"""
523+
failed to replace \(edit.range.lowerBound.utf8Offset):\(edit.range.upperBound.utf8Offset) by \
524+
'\(edit.replacement)' in sourcekitd
525+
"""
526+
)
522527
}
523528
}
524529

0 commit comments

Comments
 (0)