Class RecursionError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
Python's RecursionError: the interpreter's recursion limit was exceeded (maximum recursion depth
exceeded).
public class RecursionError : RuntimeError, ISerializable, INumSharpException
- Inheritance
-
RecursionError
- Implements
- Inherited Members
Remarks
A subclass of RuntimeError, as in Python (RecursionError → RuntimeError → Exception), so
catch (RuntimeError) catches it.
NumSharp never raises it: .NET has no recursion limit to exceed, and a stack that does run out ends the process (a StackOverflowException cannot be caught). Code that guards its own depth (EnsureSufficientExecutionStack() throws InsufficientExecutionStackException) can translate to this class where Python's code raises it.
Constructors
RecursionError()
Creates the error with Python's text for a bare raise RecursionError: an empty
Message, as str(RecursionError()) is ''.
public RecursionError()
Remarks
ToString() then starts with the class name alone, as Python's traceback prints a
bare RecursionError.
RecursionError(string)
Creates the error with the interpreter's (or the port's) message.
public RecursionError(string message)
Parameters
messagestringThe text, verbatim (
maximum recursion depth exceeded).
RecursionError(string, Exception)
Creates the error with a message and the exception that caused it: Python's raise RecursionError(message)
from innerException, the cause kept in InnerException (an
InsufficientExecutionStackException, for example).
public RecursionError(string message, Exception innerException)