Class BrokenPipeError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
Python's BrokenPipeError (errno EPIPE, ESHUTDOWN): a write to a pipe whose reader is gone,
or to a socket shut down for writing.
public class BrokenPipeError : ConnectionError, ISerializable, INumSharpException
- Inheritance
-
BrokenPipeError
- Implements
- Inherited Members
Remarks
A subclass of ConnectionError. NumSharp does not raise it; the class exists for ports and for Create(int?, string).
Constructors
BrokenPipeError()
Creates the error with Python's text for a bare raise OSError: an empty
Message, as str(OSError()) is '' (not .NET's
IOException default, "I/O error occurred."); every attribute is null.
public BrokenPipeError()
Remarks
ToString() then starts with the class name alone, as Python's traceback prints a
bare OSError; prefer a message that names the file and the operation.
BrokenPipeError(int?, string)
Python's OSError(errno, strerror): the message is CPython's [Errno 2] No such file or
directory.
public BrokenPipeError(int? errno, string strerror)
Parameters
errnoint?The operating system's error number, or null for
None.strerrorstringIts text (
strerror(errno)), or null forNone.
Remarks
Builds THIS class whatever the errno; Create(int?, string) picks the subclass the errno names, as Python's call does.
BrokenPipeError(int?, string, string)
Python's OSError(errno, strerror, filename): the message is CPython's [Errno 2] No such file or
directory: 'x.npy', the file name as Python's repr() quotes it.
public BrokenPipeError(int? errno, string strerror, string filename)
Parameters
errnoint?The operating system's error number, or null for
None.strerrorstringIts text, or null for
None.filenamestringThe file the operation was on, or null for none (the message then omits it).
BrokenPipeError(int?, string, string, int?)
Python's OSError(errno, strerror, filename, winerror): on Windows, winerror (a Windows
error code, or an HRESULT carrying one) decides errno through CPython's
winerror_to_errno, and the message reads [WinError 5] Access is denied: 'f'.
public BrokenPipeError(int? errno, string strerror, string filename, int? winerror)
Parameters
errnoint?The error number, or null for
None; replaced on Windows whenwinerroris given.strerrorstringIts text, or null for
None.filenamestringThe file the operation was on, or null for none.
winerrorint?The Windows error code, or null for
None.
Remarks
Footgun, CPython's own: on Windows a four- or five-argument call prints [WinError None] even when
winerror is null; elsewhere winerror is ignored (CPython parses it and
drops it) and winerror stays null.
BrokenPipeError(int?, string, string, int?, string)
Python's OSError(errno, strerror, filename, winerror, filename2): an operation on two files, the message
naming both ([Errno 17] File exists: 'a' -> 'b'; on Windows [WinError …]).
public BrokenPipeError(int? errno, string strerror, string filename, int? winerror, string filename2)
Parameters
errnoint?The error number, or null for
None.strerrorstringIts text, or null for
None.filenamestringThe first file, or null for none (the second is then dropped, as in CPython).
winerrorint?The Windows error code, or null for
None(see the four-argument form).filename2stringThe second file, or null for none.
BrokenPipeError(string)
Creates the error with NumPy's message text; every attribute is null, as for Python's
OSError('message').
public BrokenPipeError(string message)
Parameters
messagestringThe verbatim message (
cannot write object arrays to a file in binary mode).
BrokenPipeError(string, Exception)
Creates the error with NumPy's message text and the exception that caused it; every attribute is null.
public BrokenPipeError(string message, Exception innerException)