throw an exception when connection fails

This makes the constructor behave more like it's described in [the manual](http://www.php.net/manual/en/pdo.construct.php).