logs message of SQLException as error