💾 Archived View for source.community › ckaznocha › gemini › raw › main › errors.go captured on 2024-05-10 at 11:18:46.

View Raw

More Information

⬅️ Previous capture (2021-12-17)

-=-=-=-=-=-=-

package gemini

import (
	"errors"
	"fmt"
)

// Sentinel errors.
var (
	// Listener sentinels.
	ErrClosingListeners  = errors.New("error closing listeners")
	ErrClosingListener   = errors.New("error closing listener")
	ErrOpeningConnection = errors.New("error opening connection")

	// Request sentinels.
	ErrMaxRequestLengthExceeded = fmt.Errorf(
		"the request length exceeded the max size of %d bytes",
		maxRequestLength,
	)
	ErrRequestRead = errors.New("unable to read request")

	// Server sentinels.
	ErrServerShutdown = errors.New("server shutdown")
	ErrStartingServer = errors.New("unable to start server")
	ErrServing        = errors.New("unable to serve requests")
	ErrIO             = errors.New("IO error")

	// URL sentinels.
	ErrMalformedURI = errors.New("malformed URI")
)