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

Class WinproxyError

windows/winproxy/error.py:16–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
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)
28
29 def __repr__(self):
30 return "{0}: {1}".format(self.api_name, super(WinproxyError, self).__repr__())
31
32 def __str__(self):
33 return "{0}: {1}".format(self.api_name, super(WinproxyError, self).__str__())
34
35
36# winproxy Error check

Callers 8

fail_on_minus_oneFunction · 0.85
fail_on_zeroFunction · 0.85
succeed_on_zeroFunction · 0.85
result_is_error_codeFunction · 0.85
result_is_handleFunction · 0.85
check_invalid_socketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected