What is the best practice to throw an ArgumentTypeError exception from my own custom action and let the argparse to catch it for me?
It seems that argparse\'s try/ex
After looking at argparse source code I figured out that it translates ArgumentTypeError to ArgumentError exception.
So instead of:
raise argparse.ArgumentTypeError("Duplicate OuterIPs found")
I should have:
raise argparse.ArgumentError(self, "Duplicate OuterIPs found")
And argparse would still do the rest for me (catch exception and print usage message) ...