Moved exception handling to users of MainDBHandler.