# HG changeset patch # User Thomas Lindae # Date 1717029924 -7200 # Node ID c4bc259393f6ed6794e2de22b686435376bb0c51 # Parent d4eb94b46e83808b7c445afced3f1e91744593da lsp: updated ErrorCodes; diff -r d4eb94b46e83 -r c4bc259393f6 src/Tools/VSCode/src/lsp.scala --- a/src/Tools/VSCode/src/lsp.scala Wed May 01 12:34:53 2024 +0200 +++ b/src/Tools/VSCode/src/lsp.scala Thu May 30 02:45:24 2024 +0200 @@ -109,7 +109,7 @@ def strict(id: Id, result: Option[JSON.T] = None, error: String = ""): JSON.T = if (error == "") apply(id, result = result) - else apply(id, error = Some(ResponseError(code = ErrorCodes.serverErrorEnd, message = error))) + else apply(id, error = Some(ResponseError(code = ErrorCodes.jsonrpcReservedErrorRangeEnd, message = error))) def is_empty(json: JSON.T): Boolean = JSON.string(json, "id") == Some("") && JSON.value(json, "result").isDefined @@ -126,10 +126,20 @@ val MethodNotFound = -32601 val InvalidParams = -32602 val InternalError = -32603 - val serverErrorStart = -32099 - val serverErrorEnd = -32000 + + val jsonrpcReservedErrorRangeStart = -32099 + val ServerNotInitialized = -32002 + val UnknownErrorCode = -32001 + val jsonrpcReservedErrorRangeEnd = -32000 + + val lspReservedErrorRangeStart = -32899 + val RequestFailed = -32803 + val ServerCancelled = -32802 + val ContentModified = -32801 + val RequestCancelled = -32800 + val lspReservedErrorRangeEnd = -32800 } - + /* init and exit */