Set message for database exception