Update Database.php

added Exception handling for possible error