コード例 #1
0
ファイル: Interpreter.cs プロジェクト: modulexcite/pash-1
        internal static void AbortThreadIfRequested(InterpretedFrame frame, int targetLabelIndex)
        {
            ExceptionHandler currentAbortHandler = frame.CurrentAbortHandler;
            int index = frame.Interpreter._labels[targetLabelIndex].Index;

            if (((currentAbortHandler != null) && !currentAbortHandler.IsInsideCatchBlock(index)) && !currentAbortHandler.IsInsideFinallyBlock(index))
            {
                frame.CurrentAbortHandler = null;
                Thread currentThread = Thread.CurrentThread;
                if ((currentThread.ThreadState & ThreadState.AbortRequested) != ThreadState.Running)
                {
                    currentThread.Abort(AnyAbortException.ExceptionState);
                }
            }
        }