Inheritance: SystemException
Ejemplo n.º 1
0
    private void AppDomainUnhandledException_EventHandler(Object sender, UnhandledExceptionEventArgs e)
    {
        System.Threading.ThreadAbortException tae = e.ExceptionObject as System.Threading.ThreadAbortException;

        if (null != tae)
        {
            Object o = tae.ExceptionState;

            if (null != o && o == this)
            {
                return;
            }
        }

        _numErrors++;
        Console.WriteLine("\nAn unhandled exception was thrown and not caught in the app domain: \n{0}", e.ExceptionObject);
        Console.WriteLine("Test FAILED!!!\n");

        Environment.ExitCode = 101;
    }
Ejemplo n.º 2
0
 void IThreadPoolWorkItem.MarkAborted(ThreadAbortException tae) /* nop */ }
Ejemplo n.º 3
0
 public void MarkAborted(ThreadAbortException tae)
 {
 }
Ejemplo n.º 4
0
		void IThreadPoolWorkItem.MarkAborted(ThreadAbortException tae)
		{
		}
Ejemplo n.º 5
0
		/// <summary>
		///		Handles a <see cref="ThreadAbortException"/> if it is thrown because hard execution timeout.
		/// </summary>
		/// <param name="mayBeHardTimeoutException">A <see cref="ThreadAbortException"/> if it may be thrown because hard execution timeout.</param>
		/// <exception cref="ArgumentNullException">
		///		<paramref name="mayBeHardTimeoutException"/> is <c>null</c>.
		/// </exception>
		/// <exception cref="ThreadStateException">
		///		<paramref name="mayBeHardTimeoutException"/> is not thrown on the current thread.
		/// </exception>
		protected internal void HandleThreadAbortException( ThreadAbortException mayBeHardTimeoutException )
		{
			this._runtime.HandleThreadAbortException( mayBeHardTimeoutException );
		}
Ejemplo n.º 6
0
		public void MarkAborted(ThreadAbortException tae)
		{
		}
Ejemplo n.º 7
0
        private TestOutcome HandleAbort(MarkupDocumentWriter markupDocumentWriter, string actionDescription, ThreadAbortException ex)
        {
            TestOutcome outcome = abortOutcome.Value;
            if (ex == null && alreadyLoggedAbortOnce)
                return outcome;

            alreadyLoggedAbortOnce = true;
            LogMessage(markupDocumentWriter, actionDescription, outcome, abortMessage, null);
            return outcome;
        }
Ejemplo n.º 8
0
		public void HandleThreadAbortException( ThreadAbortException mayBeHardTimeoutException )
		{
			if ( mayBeHardTimeoutException == null )
			{
				throw new ArgumentNullException( "mayBeHardTimeoutException" );
			}

			Contract.EndContractBlock();

			if ( RpcApplicationContext.HardTimeoutToken.Equals( mayBeHardTimeoutException.ExceptionState ) )
			{
				try
				{
					ResetThreadAbort();
				}
				catch ( SecurityException ) { }
				catch ( MemberAccessException ) { }
			}
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreadAbortAlert" /> class.
 /// </summary>
 /// <param name="operationIdentity">The operation identity.</param>
 /// <param name="data">The data.</param>
 public ThreadAbortAlert(string operationIdentity, ThreadAbortException data = null)
     : base(GetFullMessage(FaultCode.ThreadAbortMessage, operationIdentity, Thread.CurrentThread.ManagedThreadId.ToString()), FaultCode.UnauthorizedOperation, data, null)
 {
 }