💾 Archived View for source.community › ckaznocha › gemini › raw › main › errors.go captured on 2023-07-10 at 13:37:09.

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")
)