internal static void SetTraceBack(this Exception e, TraceBack traceback) { if (e is IPythonAwareException pyAware) { pyAware.TraceBack = traceback; } else { e.Data[typeof(TraceBack)] = traceback; } }
internal Exception CreateClrExceptionWithCause(BaseException cause, BaseException context) { _cause = cause; _context = context; _traceback = null; if (cause != null) { return(GetClrException(cause.GetClrException())); } if (context != null) { return(GetClrException(context.GetClrException())); } return(GetClrException()); }
public TraceBack(TraceBack nextTraceBack, TraceBackFrame fromFrame) { _next = nextTraceBack; _frame = fromFrame; }
internal static void SetTraceBack(this Exception e, TraceBack traceback) { IPythonAwareException pyAware = e as IPythonAwareException; if (pyAware != null) { pyAware.TraceBack = traceback; } else { e.SetData(typeof(TraceBack), traceback); } }
public void ClearException() { ThreadAbortException tae = SystemState.RawException as ThreadAbortException; if (tae != null && tae.ExceptionState is PythonKeyboardInterruptException) { Thread.ResetAbort(); } SystemState.RawException = null; SystemState.RawTraceBack = null; }
public object with_traceback(TraceBack tb) { __traceback__ = tb; return(this); }