title: Java: missing return statement after try-catch
body: <p>I'm using the code below in a <code>Triangle</code> class to allow the user to set the first, second, or third point of a declared <code>Triangle</code>.</p>
  
  <pre><code>public Point get(String p) throws IllegalArgumentException {
      IllegalArgumentException e = new IllegalArgumentException();
      try {
          if (p == "first") { return first; }
          else if (p == "second") { return second; }
          else if (p == "third") { return third; }
          else { throw e; }
      }
      catch (e) {
          System.out.println("Error: " + e);
      }
  }
  </code></pre>
  
  <p>The compiler is telling me:  </p>
  
  <pre><code>Triangle.java:41: error: missing return statement
      }
      ^
  </code></pre>
  
  <p>But I thought the point of the catch statement was to be able to catch an error and return a string describing the error, without having to worry about matching the function's return type.</p>