<reponame>corb555/Geodata<gh_stars>0
""" Command argument parser that throws exception rather than exitting """

import argparse


# Variant of ArgParse which will not exit when there is a parser error, instead raises exception
class ArgumentParserError(Exception):
    pass


class ArgumentParserNoExit(argparse.ArgumentParser):
    def error(self, message):
        raise ArgumentParserError(message)
