SQL fetch with try / catch reading into a $table array

Error!: SQLSTATE[28000] [1045] Access denied for user 'databaseusername'@'localhost' (using password: YES)