C# 클래스 Python.Runtime.Exceptions

Encapsulates the Python exception APIs.
파일 보기 프로젝트 열기: pythonnet/pythonnet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ArithmeticError System.IntPtr
AssertionError System.IntPtr
AttributeError System.IntPtr
BaseException System.IntPtr
DeprecationWarning System.IntPtr
EOFError System.IntPtr
EnvironmentError System.IntPtr
Exception System.IntPtr
FloatingPointError System.IntPtr
FutureWarning System.IntPtr
GeneratorExit System.IntPtr
IOError System.IntPtr
ImportError System.IntPtr
ImportWarning System.IntPtr
IndentationError System.IntPtr
IndexError System.IntPtr
KeyError System.IntPtr
KeyboardInterrupt System.IntPtr
LookupError System.IntPtr
MemoryError System.IntPtr
NameError System.IntPtr
NotImplementedError System.IntPtr
OSError System.IntPtr
OverflowError System.IntPtr
PendingDeprecationWarning System.IntPtr
ReferenceError System.IntPtr
RuntimeError System.IntPtr
RuntimeWarning System.IntPtr
StandardError System.IntPtr
StopIteration System.IntPtr
SyntaxError IntPtr
SyntaxWarning IntPtr
SystemError IntPtr
SystemExit IntPtr
TabError IntPtr
TypeError IntPtr
UnboundLocalError IntPtr
UnicodeDecodeError IntPtr
UnicodeEncodeError IntPtr
UnicodeError IntPtr
UnicodeTranslateError IntPtr
UnicodeWarning IntPtr
UserWarning IntPtr
ValueError IntPtr
Warning IntPtr
ZeroDivisionError IntPtr

공개 메소드들

메소드 설명
Clear ( ) : void

Clear Method

Clear any exception that has been set in the Python runtime.

ErrorOccurred ( ) : bool

ErrorOccurred Method

Returns true if an exception occurred in the Python runtime. This is a wrapper for the Python PyErr_Occurred call.

ExceptionMatches ( IntPtr ob ) : bool

ExceptionMatches Method

Returns true if the current Python exception matches the given Python object. This is a wrapper for PyErr_ExceptionMatches.

ExceptionMatches ( IntPtr exc, IntPtr ob ) : bool

ExceptionMatches Method

Returns true if the given Python exception matches the given Python object. This is a wrapper for PyErr_GivenExceptionMatches.

SetError ( Exception e ) : void

SetError Method

Sets the current Python exception given a CLR exception object. The CLR exception instance is wrapped as a Python object, allowing it to be handled naturally from Python.

SetError ( IntPtr ob, IntPtr value ) : void

SetError Method

Sets the current Python exception given a Python object. This is a wrapper for the Python PyErr_SetObject call.

SetError ( IntPtr ob, string value ) : void

SetError Method

Sets the current Python exception given a native string. This is a wrapper for the Python PyErr_SetString call.

deprecation ( string message ) : void
deprecation ( string message, int stacklevel ) : void
warn ( string message, IntPtr exception ) : void
warn ( string message, IntPtr exception, int stacklevel ) : void

Alias for Python's warnings.warn() function.

비공개 메소드들

메소드 설명
ErrorCheck ( IntPtr pointer ) : void

Shortcut for (pointer == NULL) -> throw PythonException

ErrorOccurredCheck ( IntPtr pointer ) : void

Shortcut for (pointer == NULL or ErrorOccurred()) -> throw PythonException

Exceptions ( ) : System
Initialize ( ) : void
RaiseTypeError ( string message ) : IntPtr
SetArgsAndCause ( IntPtr ob ) : void

Set the 'args' slot on a python exception object that wraps a CLR exception. This is needed for pickling CLR exceptions as BaseException_reduce will only check the slots, bypassing the __getattr__ implementation, and thus dereferencing a NULL pointer.

Shutdown ( ) : void

메소드 상세

Clear() 공개 정적인 메소드

Clear Method
Clear any exception that has been set in the Python runtime.
public static Clear ( ) : void
리턴 void

ErrorOccurred() 공개 정적인 메소드

ErrorOccurred Method
Returns true if an exception occurred in the Python runtime. This is a wrapper for the Python PyErr_Occurred call.
public static ErrorOccurred ( ) : bool
리턴 bool

ExceptionMatches() 공개 정적인 메소드

ExceptionMatches Method
Returns true if the current Python exception matches the given Python object. This is a wrapper for PyErr_ExceptionMatches.
public static ExceptionMatches ( IntPtr ob ) : bool
ob System.IntPtr
리턴 bool

ExceptionMatches() 공개 정적인 메소드

ExceptionMatches Method
Returns true if the given Python exception matches the given Python object. This is a wrapper for PyErr_GivenExceptionMatches.
public static ExceptionMatches ( IntPtr exc, IntPtr ob ) : bool
exc System.IntPtr
ob System.IntPtr
리턴 bool

SetError() 공개 정적인 메소드

SetError Method
Sets the current Python exception given a CLR exception object. The CLR exception instance is wrapped as a Python object, allowing it to be handled naturally from Python.
public static SetError ( Exception e ) : void
e System.Exception
리턴 void

SetError() 공개 정적인 메소드

SetError Method
Sets the current Python exception given a Python object. This is a wrapper for the Python PyErr_SetObject call.
public static SetError ( IntPtr ob, IntPtr value ) : void
ob System.IntPtr
value System.IntPtr
리턴 void

SetError() 공개 정적인 메소드

SetError Method
Sets the current Python exception given a native string. This is a wrapper for the Python PyErr_SetString call.
public static SetError ( IntPtr ob, string value ) : void
ob System.IntPtr
value string
리턴 void

deprecation() 공개 정적인 메소드

public static deprecation ( string message ) : void
message string
리턴 void

deprecation() 공개 정적인 메소드

public static deprecation ( string message, int stacklevel ) : void
message string
stacklevel int
리턴 void

warn() 공개 정적인 메소드

public static warn ( string message, IntPtr exception ) : void
message string
exception IntPtr
리턴 void

warn() 공개 정적인 메소드

Alias for Python's warnings.warn() function.
public static warn ( string message, IntPtr exception, int stacklevel ) : void
message string
exception IntPtr
stacklevel int
리턴 void

프로퍼티 상세

ArithmeticError 공개적으로 정적으로 프로퍼티

public static IntPtr,System ArithmeticError
리턴 System.IntPtr

AssertionError 공개적으로 정적으로 프로퍼티

public static IntPtr,System AssertionError
리턴 System.IntPtr

AttributeError 공개적으로 정적으로 프로퍼티

public static IntPtr,System AttributeError
리턴 System.IntPtr

BaseException 공개적으로 정적으로 프로퍼티

public static IntPtr,System BaseException
리턴 System.IntPtr

DeprecationWarning 공개적으로 정적으로 프로퍼티

public static IntPtr,System DeprecationWarning
리턴 System.IntPtr

EOFError 공개적으로 정적으로 프로퍼티

public static IntPtr,System EOFError
리턴 System.IntPtr

EnvironmentError 공개적으로 정적으로 프로퍼티

public static IntPtr,System EnvironmentError
리턴 System.IntPtr

Exception 공개적으로 정적으로 프로퍼티

public static IntPtr,System Exception
리턴 System.IntPtr

FloatingPointError 공개적으로 정적으로 프로퍼티

public static IntPtr,System FloatingPointError
리턴 System.IntPtr

FutureWarning 공개적으로 정적으로 프로퍼티

public static IntPtr,System FutureWarning
리턴 System.IntPtr

GeneratorExit 공개적으로 정적으로 프로퍼티

public static IntPtr,System GeneratorExit
리턴 System.IntPtr

IOError 공개적으로 정적으로 프로퍼티

public static IntPtr,System IOError
리턴 System.IntPtr

ImportError 공개적으로 정적으로 프로퍼티

public static IntPtr,System ImportError
리턴 System.IntPtr

ImportWarning 공개적으로 정적으로 프로퍼티

public static IntPtr,System ImportWarning
리턴 System.IntPtr

IndentationError 공개적으로 정적으로 프로퍼티

public static IntPtr,System IndentationError
리턴 System.IntPtr

IndexError 공개적으로 정적으로 프로퍼티

public static IntPtr,System IndexError
리턴 System.IntPtr

KeyError 공개적으로 정적으로 프로퍼티

public static IntPtr,System KeyError
리턴 System.IntPtr

KeyboardInterrupt 공개적으로 정적으로 프로퍼티

public static IntPtr,System KeyboardInterrupt
리턴 System.IntPtr

LookupError 공개적으로 정적으로 프로퍼티

public static IntPtr,System LookupError
리턴 System.IntPtr

MemoryError 공개적으로 정적으로 프로퍼티

public static IntPtr,System MemoryError
리턴 System.IntPtr

NameError 공개적으로 정적으로 프로퍼티

public static IntPtr,System NameError
리턴 System.IntPtr

NotImplementedError 공개적으로 정적으로 프로퍼티

public static IntPtr,System NotImplementedError
리턴 System.IntPtr

OSError 공개적으로 정적으로 프로퍼티

public static IntPtr,System OSError
리턴 System.IntPtr

OverflowError 공개적으로 정적으로 프로퍼티

public static IntPtr,System OverflowError
리턴 System.IntPtr

PendingDeprecationWarning 공개적으로 정적으로 프로퍼티

public static IntPtr,System PendingDeprecationWarning
리턴 System.IntPtr

ReferenceError 공개적으로 정적으로 프로퍼티

public static IntPtr,System ReferenceError
리턴 System.IntPtr

RuntimeError 공개적으로 정적으로 프로퍼티

public static IntPtr,System RuntimeError
리턴 System.IntPtr

RuntimeWarning 공개적으로 정적으로 프로퍼티

public static IntPtr,System RuntimeWarning
리턴 System.IntPtr

StandardError 공개적으로 정적으로 프로퍼티

public static IntPtr,System StandardError
리턴 System.IntPtr

StopIteration 공개적으로 정적으로 프로퍼티

public static IntPtr,System StopIteration
리턴 System.IntPtr

SyntaxError 공개적으로 정적으로 프로퍼티

public static IntPtr SyntaxError
리턴 IntPtr

SyntaxWarning 공개적으로 정적으로 프로퍼티

public static IntPtr SyntaxWarning
리턴 IntPtr

SystemError 공개적으로 정적으로 프로퍼티

public static IntPtr SystemError
리턴 IntPtr

SystemExit 공개적으로 정적으로 프로퍼티

public static IntPtr SystemExit
리턴 IntPtr

TabError 공개적으로 정적으로 프로퍼티

public static IntPtr TabError
리턴 IntPtr

TypeError 공개적으로 정적으로 프로퍼티

public static IntPtr TypeError
리턴 IntPtr

UnboundLocalError 공개적으로 정적으로 프로퍼티

public static IntPtr UnboundLocalError
리턴 IntPtr

UnicodeDecodeError 공개적으로 정적으로 프로퍼티

public static IntPtr UnicodeDecodeError
리턴 IntPtr

UnicodeEncodeError 공개적으로 정적으로 프로퍼티

public static IntPtr UnicodeEncodeError
리턴 IntPtr

UnicodeError 공개적으로 정적으로 프로퍼티

public static IntPtr UnicodeError
리턴 IntPtr

UnicodeTranslateError 공개적으로 정적으로 프로퍼티

public static IntPtr UnicodeTranslateError
리턴 IntPtr

UnicodeWarning 공개적으로 정적으로 프로퍼티

public static IntPtr UnicodeWarning
리턴 IntPtr

UserWarning 공개적으로 정적으로 프로퍼티

public static IntPtr UserWarning
리턴 IntPtr

ValueError 공개적으로 정적으로 프로퍼티

public static IntPtr ValueError
리턴 IntPtr

Warning 공개적으로 정적으로 프로퍼티

public static IntPtr Warning
리턴 IntPtr

ZeroDivisionError 공개적으로 정적으로 프로퍼티

public static IntPtr ZeroDivisionError
리턴 IntPtr