Fixes #1567444 - Wrong exception (PDOException) was in a catch statement instead of DatabaseException - thanks for aspilicious's help