title: Program crash after throw why?
body: <p>I am trying to understand try/catch/throw with your own exception..</p>
  
  <p>This is my custom exception class:</p>
  
  <pre><code>[Serializable]
  class CustomException : FormatException
  {
      /// &lt;summary&gt;
      /// Just create the exception
      /// &lt;/summary&gt;
      public CustomException()
         : base()
      { }
  
      /// &lt;summary&gt;
      /// Create the exception with description
      /// &lt;/summary&gt;
      /// &lt;param name="message"&gt;Exception description&lt;/param&gt;
      public CustomException(String message)
          : base(message)
      { }
  
      /// &lt;summary&gt;
      /// Create the exception with description and inner cause
      /// &lt;/summary&gt;
      /// &lt;param name="message"&gt;Exception description&lt;/param&gt;
      /// &lt;param name="innerException"&gt;Exception inner cause&lt;/param&gt;
      public CustomException(String message, Exception ex)
          : base(message, ex)
      {
          MessageBox.Show(message + ex.Message);
      }
  }
  </code></pre>
  
  <p>This is where i use it:</p>
  
  <pre><code>public static int ParseInput(string inInt)
  {
      try
      {
          int input = int.Parse(inInt);
          return input;
      }
      catch (FormatException e)
      {
          throw new CustomException("Only use numbers! ", e);
      }
  }
  </code></pre>
  
  <p>Now when I run the program and but in a char the program crash it shows the MessageBox then the program stops.. and show the classic error window with this info: An unhandled exception of type 'Spelregistrering.CustomException' occurred in Spelregistrering.exe</p>
  
  <p>I want the program to run after the exception like it always do with a original try/catch.. what have I not understood or missed?</p>
  
  <p>EDIT:
  I know about the TryParse, this code I just for me to better understand custom exceptions! And your answers show that I clearly don't understand them just yet..</p>