Skip to content

Commit 1af33bc

Browse files
committed
error: add more document
1 parent 03ef512 commit 1af33bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

error.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,33 @@ type Code int64
1717
const (
1818
// ParseError is the invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
1919
ParseError = Code(-32700)
20+
2021
// InvalidRequest is the JSON sent is not a valid Request object.
2122
InvalidRequest = Code(-32600)
23+
2224
// MethodNotFound is the method does not exist / is not available.
2325
MethodNotFound = Code(-32601)
26+
2427
// InvalidParams is the invalid method parameter(s).
2528
InvalidParams = Code(-32602)
29+
2630
// InternalError is the internal JSON-RPC error.
2731
InternalError = Code(-32603)
2832

2933
// ServerNotInitialized is the error of server not initialized.
3034
ServerNotInitialized = Code(-32002)
35+
3136
// UnknownError should be used for all non coded errors.
3237
UnknownError = Code(-32001)
38+
3339
// RequestCancelled is the cancellation error.
40+
//
41+
// Defined by the Language Server Protocol.
3442
RequestCancelled = Code(-32800)
43+
3544
// ContentModified is the state change that invalidates the result of a request in execution.
45+
//
46+
// Defined by the Language Server Protocol.
3647
ContentModified = Code(-32801)
3748

3849
// ServerOverloaded is returned when a message was refused due to a

0 commit comments

Comments
 (0)