title: C# throw exception to caller
body: <p>I have a function that needs to throw an exception, but I wanted it to throw that exception to the line where I called that function:</p>
  
  <pre><code>static int retrieveInt()
  {
      int a = getInt();
      if(a == -1)
          throw new Exception("Number not found"); //The runtime error is pointing to this line
      return a;
  }
  
  static void Main(string[] args)
  {
       int a = retrieveInt(); //The runtime error would be happening here
  }
  </code></pre>