Table of Contents

Class ConnectionAbortedError

Namespace
NumSharp
Assembly
NumSharp.dll

Python's ConnectionAbortedError (errno ECONNABORTED): a connection the peer (or the local stack) aborted.

public class ConnectionAbortedError : ConnectionError, ISerializable, INumSharpException
Inheritance
ConnectionAbortedError
Implements
Inherited Members

Remarks

A subclass of ConnectionError. NumSharp does not raise it; the class exists for ports and for Create(int?, string).

Constructors

ConnectionAbortedError()

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 ConnectionAbortedError()

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.

ConnectionAbortedError(int?, string)

Python's OSError(errno, strerror): the message is CPython's [Errno 2] No such file or directory.

public ConnectionAbortedError(int? errno, string strerror)

Parameters

errno int?

The operating system's error number, or null for None.

strerror string

Its text (strerror(errno)), or null for None.

Remarks

Builds THIS class whatever the errno; Create(int?, string) picks the subclass the errno names, as Python's call does.

ConnectionAbortedError(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 ConnectionAbortedError(int? errno, string strerror, string filename)

Parameters

errno int?

The operating system's error number, or null for None.

strerror string

Its text, or null for None.

filename string

The file the operation was on, or null for none (the message then omits it).

ConnectionAbortedError(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 ConnectionAbortedError(int? errno, string strerror, string filename, int? winerror)

Parameters

errno int?

The error number, or null for None; replaced on Windows when winerror is given.

strerror string

Its text, or null for None.

filename string

The file the operation was on, or null for none.

winerror int?

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.

ConnectionAbortedError(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 ConnectionAbortedError(int? errno, string strerror, string filename, int? winerror, string filename2)

Parameters

errno int?

The error number, or null for None.

strerror string

Its text, or null for None.

filename string

The first file, or null for none (the second is then dropped, as in CPython).

winerror int?

The Windows error code, or null for None (see the four-argument form).

filename2 string

The second file, or null for none.

ConnectionAbortedError(string)

Creates the error with NumPy's message text; every attribute is null, as for Python's OSError('message').

public ConnectionAbortedError(string message)

Parameters

message string

The verbatim message (cannot write object arrays to a file in binary mode).

ConnectionAbortedError(string, Exception)

Creates the error with NumPy's message text and the exception that caused it; every attribute is null.

public ConnectionAbortedError(string message, Exception innerException)

Parameters

message string

The verbatim message.

innerException Exception

The cause (the .NET I/O exception behind a failed write).