Updated exitError method.