Ejemplo n.º 1
0
 /// <summary>
 /// Called by the Java Virtual Machine when a thread in this
 /// thread group stops because of an uncaught exception, and the thread
 /// does not have a specific <seealso cref="Thread.UncaughtExceptionHandler"/>
 /// installed.
 /// <para>
 /// The <code>uncaughtException</code> method of
 /// <code>ThreadGroup</code> does the following:
 /// <ul>
 /// <li>If this thread group has a parent thread group, the
 ///     <code>uncaughtException</code> method of that parent is called
 ///     with the same two arguments.
 /// <li>Otherwise, this method checks to see if there is a
 ///     {@link Thread#getDefaultUncaughtExceptionHandler default
 ///     uncaught exception handler} installed, and if so, its
 ///     <code>uncaughtException</code> method is called with the same
 ///     two arguments.
 /// <li>Otherwise, this method determines if the <code>Throwable</code>
 ///     argument is an instance of <seealso cref="ThreadDeath"/>. If so, nothing
 ///     special is done. Otherwise, a message containing the
 ///     thread's name, as returned from the thread's {@link
 ///     Thread#getName getName} method, and a stack backtrace,
 ///     using the <code>Throwable</code>'s {@link
 ///     Throwable#printStackTrace printStackTrace} method, is
 ///     printed to the <seealso cref="System#err standard error stream"/>.
 /// </ul>
 /// </para>
 /// <para>
 /// Applications can override this method in subclasses of
 /// <code>ThreadGroup</code> to provide alternative handling of
 /// uncaught exceptions.
 ///
 /// </para>
 /// </summary>
 /// <param name="t">   the thread that is about to exit. </param>
 /// <param name="e">   the uncaught exception.
 /// @since   JDK1.0 </param>
 public virtual void UncaughtException(Thread t, Throwable e)
 {
     if (Parent_Renamed != null)
     {
         Parent_Renamed.UncaughtException(t, e);
     }
     else
     {
         Thread.UncaughtExceptionHandler ueh = Thread.DefaultUncaughtExceptionHandler;
         if (ueh != null)
         {
             ueh.UncaughtException(t, e);
         }
         else if (!(e is ThreadDeath))
         {
             System.Console.Error.Write("Exception in thread \"" + t.Name + "\" ");
             e.PrintStackTrace(System.err);
         }
     }
 }
Ejemplo n.º 2
0
 public static void setDefaultUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)
 {
 }
Ejemplo n.º 3
0
 public virtual void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler prm1)
 {
 }
Ejemplo n.º 4
0
 public UncaughtExceptionHandlerAnonymousInnerClassHelper(PatternAnalyzerTest outerInstance, UncaughtExceptionHandler savedHandler)
 {
     this.outerInstance = outerInstance;
       this.savedHandler = savedHandler;
 }