Moved excepton handling from DB to Core.