cheroot.errors module¶
Collection of exceptions raised and/or processed by Cheroot.
- exception cheroot.errors.FatalSSLAlert¶
Bases:
Exception
Exception raised when the SSL implementation signals a fatal alert.
- exception cheroot.errors.MaxSizeExceeded¶
Bases:
Exception
Exception raised when a client sends more data then acceptable within limit.
Depends on
request.body.maxbytes
config option if used within CherryPy
- exception cheroot.errors.NoSSLError¶
Bases:
Exception
Exception raised when a client speaks HTTP to an HTTPS socket.
- cheroot.errors.acceptable_sock_shutdown_error_codes = {32, 104, 107, 108}¶
Errors that may happen during the connection close sequence.
ENOTCONN — client is no longer connected
EPIPE — write on a pipe while the other end has been closed
ESHUTDOWN — write on a socket which has been shutdown for writing
ECONNRESET — connection is reset by the peer, we received a TCP RST packet
Refs: * https://github.com/cherrypy/cheroot/issues/341#issuecomment-735884889 * https://bugs.python.org/issue30319 * https://bugs.python.org/issue30329 * https://github.com/python/cpython/commit/83a2c28 * https://github.com/python/cpython/blob/c39b52f/Lib/poplib.py#L297-L302 * https://docs.microsoft.com/windows/win32/api/winsock/nf-winsock-shutdown
- cheroot.errors.plat_specific_errors(*errnames)¶
Return error numbers for all errors in
errnames
on this platform.The
errno
module contains different global constants depending on the specific platform (OS). This function will return the list of numeric values for a given list of potential names.