Example #1
0
 internal static void SetTraceBack(this Exception e, TraceBack traceback)
 {
     if (e is IPythonAwareException pyAware)
     {
         pyAware.TraceBack = traceback;
     }
     else
     {
         e.Data[typeof(TraceBack)] = traceback;
     }
 }
Example #2
0
            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());
            }
Example #3
0
 public TraceBack(TraceBack nextTraceBack, TraceBackFrame fromFrame)
 {
     _next  = nextTraceBack;
     _frame = fromFrame;
 }
Example #4
0
 public TraceBack(TraceBack nextTraceBack, TraceBackFrame fromFrame)
 {
     _next = nextTraceBack;
     _frame = fromFrame;
 }
Example #5
0
 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;
        }
Example #7
0
 public object with_traceback(TraceBack tb)
 {
     __traceback__ = tb;
     return(this);
 }