MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / __new__

Method __new__

windows/winproxy/error.py:17–24  ·  view source on GitHub ↗
(cls, func_name, error_code=None)

Source from the content-addressed store, hash-verified

15# PFW Winproxy Exception type
16class WinproxyError(WindowsError):
17 def __new__(cls, func_name, error_code=None):
18 win_error = ctypes.WinError(error_code) #GetLastError by default
19 api_error = super(WinproxyError, cls).__new__(cls)
20 api_error.api_name = func_name
21 api_error.winerror = win_error.winerror & 0xffffffff
22 api_error.strerror = win_error.strerror
23 api_error.args = (func_name, win_error.winerror, win_error.strerror)
24 return api_error
25
26 def __init__(self, func_name, error_code=None):
27 super(WinproxyError, self).__init__(func_name)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected