These are the one you need to wrap too, as you are throwing exceptions here (the PDOMySQL driver only assume that these params are available as it is already checked by the DriverManager before setting the value in the connection, so it is expected to be valid in connect