Skip to content

Commit

Permalink
fix: throw ResponseError instead of NSError
Browse files Browse the repository at this point in the history
  • Loading branch information
louisunlimited committed Jun 26, 2024
1 parent 1912c27 commit f080229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SourceKitLSP/Swift/SwiftLanguageService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public actor SwiftLanguageService: LanguageService, Sendable {
var documentManager: DocumentManager {
get throws {
guard let sourceKitLSPServer = self.sourceKitLSPServer else {
throw NSError(domain: "SourceKitLSPErrorDomain", code: 1001, userInfo: [NSLocalizedDescriptionKey: "Cannot get document manager because sourceKitLSPServer was deallocated"])
throw ResponseError.unknown("Connection to the editor closed")
}
return sourceKitLSPServer.documentManager
}
Expand Down

0 comments on commit f080229

Please sign in to comment.