title: Exception handling in threads
body: <p>Recently i have attended an  interview . A code snippet is given to me.I know,the interviewer took  it from albhari's threading sample.</p>
  
  <pre><code>public static void Main() 
  {
      try 
      {
          new Thread (Go).Start();
      }
      catch (Exception ex)
      {
          // We'll never get here!
         Console.WriteLine ("Exception!");
      }
  }
  
  static void Go() { throw null; }
  </code></pre>
  
  <p>The modification of the above code as</p>
  
  <pre><code>public static void Main()
  {
      new Thread (Go).Start();
  }
  
  static void Go() 
  {
      try 
      {
          ...
          throw null; // this exception will get caught below
          ...
      }
      catch (Exception ex) 
      {
          Typically log the exception, and/or signal another thread
          that we've come unstuck
          ...
      }
  }
  </code></pre>
  
  <p>would be the good candidate to handle the exception.</p>
  
  <p>I have been asked, "Except the above trail what are the other alternatives would fit as good solution?. It was hard to find the alternative,so i raise it here to gather your suggestion.</p>