raising argparse exception in factory