This is a part of -X parameter error handling. In parser I use user defined callback function to check validity of -X parameter argument(s). If I find problem, e.g. missing argument, then I should handle this situation. If I throw an exception there then it handled by the parser.parse_arg() code instead of my. Therefore I store this error code (which is not a valid -X argument) and tested here to throw own Error exception.