class documentation

class twisted.python.win32._ErrorFormatter: (source)

View In Hierarchy

Formatter for Windows error messages.

Instance Variable winError A callable which takes one integer error number argument and returns a WindowsError instance for that error (like ctypes.WinError).
Instance Variable formatMessage A callable which takes one integer error number argument and returns a str giving the message for that error (like win32api.FormatMessage).
Instance Variable errorTab A mapping from integer error numbers to str messages which correspond to those erorrs (like socket.errorTab).
Method __init__ Undocumented
Class Method fromEnvironment Get as many of the platform-specific error translation objects as possible and return an instance of cls created with them.
Method formatError Returns the string associated with a Windows error message, such as the ones found in socket.error.
winError = (source)
A callable which takes one integer error number argument and returns a WindowsError instance for that error (like ctypes.WinError).
formatMessage = (source)
A callable which takes one integer error number argument and returns a str giving the message for that error (like win32api.FormatMessage).
errorTab = (source)
A mapping from integer error numbers to str messages which correspond to those erorrs (like socket.errorTab).
def __init__(self, WinError, FormatMessage, errorTab): (source)

Undocumented

@classmethod
def fromEnvironment(cls): (source)

Get as many of the platform-specific error translation objects as possible and return an instance of cls created with them.

def formatError(self, errorcode): (source)

Returns the string associated with a Windows error message, such as the ones found in socket.error.

Attempts direct lookup against the win32 API via ctypes and then pywin32 if available), then in the error table in the socket module, then finally defaulting to os.strerror.

Parameterserrorcodethe Windows error code (type: int)
ReturnsThe error message string (type: str)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.