use {
crate::protocol::macros::lsp_enum,
serde::{
Deserialize,
Serialize,
},
};
#[derive(
Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize,
)]
#[serde(transparent)]
pub struct ErrorCode(i32);
lsp_enum! {
impl ErrorCode {
const SERVER_NOT_INITIALIZED = -32002;
const UNKNOWN_ERROR_CODE = -32001;
const LSP_RESERVED_ERROR_RANGE_START = -32899;
const REQUEST_FAILED = -32803;
const SERVER_CANCELLED = -32802;
const CONTENT_MODIFIED = -32801;
const REQUEST_CANCELLED = -32800;
}
}
pub const LSP_RESERVED_ERROR_RANGE_END: ErrorCode = ErrorCode(-32800);