假如数据库账号写错了 那在抛出异常之前 PHP就会报错的啊?抛出异常没卵用啊
Warning: mysql_connect(): Access denied for user 'rosot'@'localhost' (using password: YES) in D:\phpStudy\WWW\APPapi\db.php on line 29
Fatal error: Uncaught exception 'Exception' with message 'mysql connect errorAccess denied for user 'rosot'@'localhost' (using password: YES)' in D:\phpStudy\WWW\APPapi\db.php:33 Stack trace: #0 D:\phpStudy\WWW\APPapi\db.php(46): Db->connect() #1 D:\phpStudy\WWW\APPapi\list.php(6): require_once('D:\\phpStudy\\WWW...') #2 {main} thrown in D:\phpStudy\WWW\APPapi\db.php on line 33