Help us shape the future of Go! Take the 2026 Go Developer Survey

errors

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NoUUIDOnWireError reports that the request is missing a UUID.
	NoUUIDOnWireError = New("UUID is required")
	// NoMessageOnWireError reports that the request is missing a message.
	NoMessageOnWireError = New("no message on wire")
)

Functions

func IsBadRequest

func IsBadRequest(e error) bool

IsBadRequest reports whether the error is a bad request from the caller.

func New

func New(msg string) error

New returns an error that formats as the given text. Each call to New returns a distinct error value even if the text is identical.

func NotFoundUUID

func NotFoundUUID(e error) (_ uuid.UUID, ok bool)

NotFoundUUID returns an UUID and true if UUIDNotFoundError is part of the error chain.

Types

type DocumentLanguageIDError

type DocumentLanguageIDError struct {
	Document            protocol.TextDocumentItem
	ExpectedLanguageIDs []protocol.LanguageIdentifier
}

DocumentLanguageIDError indicates that a document's language ID does not match any of the expected values.

func (*DocumentLanguageIDError) Error

func (n *DocumentLanguageIDError) Error() string

Error is an implementation of the error interface.

type DocumentNotFoundError

type DocumentNotFoundError struct {
	Document protocol.TextDocumentIdentifier
}

DocumentNotFoundError indicates that a document is not found.

func (*DocumentNotFoundError) Error

func (n *DocumentNotFoundError) Error() string

Error is an implementation of the error interface.

type DocumentOutdatedError

type DocumentOutdatedError struct {
	CurrentDocument  protocol.TextDocumentItem
	OutdatedDocument protocol.TextDocumentItem
}

DocumentOutdatedError indicates that a document is outdated.

func (*DocumentOutdatedError) Error

func (n *DocumentOutdatedError) Error() string

Error is an implementation of the error interface.

type DocumentSizeLimitError

type DocumentSizeLimitError struct {
	Size int64
}

DocumentSizeLimitError indicates that has exceeded the specified size limit

func (*DocumentSizeLimitError) Error

func (n *DocumentSizeLimitError) Error() string

Error is an implementation of the error interface.

type NoSessionFoundError

type NoSessionFoundError struct{}

NoSessionFoundError indicates that a session cannot be found within the context.

func (*NoSessionFoundError) Error

func (n *NoSessionFoundError) Error() string

Error is an implementation of the error interface.

type UUIDNotFoundError

type UUIDNotFoundError struct {
	UUID uuid.UUID
}

UUIDNotFoundError is a service domain error for not found.

func (*UUIDNotFoundError) Error

func (n *UUIDNotFoundError) Error() string

Error is an implementation of the error interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL