Skip to content

enum SourceKitdError case to lower camel case #21821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tools/SourceKit/tools/swift-lang/SwiftLang.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
import Foundation

enum SourceKitdError: Error, CustomStringConvertible {
case EditorOpenError(message: String)
case EditorCloseError(message: String)
case editorOpenError(message: String)
case editorCloseError(message: String)

var description: String {
switch self {
case .EditorOpenError(let message):
case .editorOpenError(let message):
return "cannot open document: \(message)"
case .EditorCloseError(let message):
case .editorCloseError(let message):
return "cannot close document: \(message)"
}
}
Expand Down Expand Up @@ -161,14 +161,14 @@ extension SwiftLang {
// FIXME: SourceKitd error handling.
let Resp = Service.sendSyn(request: Request)
if Resp.isError {
throw SourceKitdError.EditorOpenError(message: Resp.description)
throw SourceKitdError.editorOpenError(message: Resp.description)
}

let CloseReq = SourceKitdRequest(uid: .request_EditorClose)
CloseReq.addParameter(.key_Name, value: content.name)
let CloseResp = Service.sendSyn(request: CloseReq)
if CloseResp.isError {
throw SourceKitdError.EditorCloseError(message: CloseResp.description)
throw SourceKitdError.editorCloseError(message: CloseResp.description)
}
return try format.makeTree(Resp.value)
}
Expand Down