Change 'handleFlagWarnings' to throw exceptions instead of dying.