title: unexpected T_CATCH, expecting T_FUNCTION
body: <p>Today, while trying to write this User class, I ran into the above error on the highlighted line below, and was wondering what you lot thought of it.</p>
  
  <pre><code>class User {
    public $username;
    public $password;
    public $user_info;
    public $connection;
  
    function __construct($username) {
     $connection = new Database();
     try {
     $user_info = $connection-&gt;query("SELECT * FROM `users` WHERE `username` = '$username'");
     if ($user_info == null) {
      throw new Exception("Could not find user details, please try again later!");
     }
     ***} catch (Exception $login) {***
      die($login-&gt;getMessage());
     }
     session_start();
     $_SESSION["dgs_tech"] = $user_info;
    }
  
    function update_info() {
     $user_info = $connection-&gt;query("SELECT * FROM `users` WHERE `username` = '$username'");
     if ($user_info == null) {
      throw new Exception("Could not find user details, please try again later!");
     }
     } catch (Exception $login) {
      die($login-&gt;getMessage());
     }
     $_SESSION{"dgs_tech"] = $user_info;
    }
  
    function return_info() {
     $text = "&lt;p&gt;"
     foreach($user_info as $name =&gt; $item) {
      $text += "&lt;h1&gt;$name:&lt;/h1&gt;$item&lt;br/&gt;";
     }
     $text += "&lt;/p&gt;";
     return $text;
    }
   }
  </code></pre>