src/CLIParser.h
branchv_0
changeset 47 329757999664
parent 46 ab27422a34b0
equal deleted inserted replaced
46:ab27422a34b0 47:329757999664
   105 				}
   105 				}
   106 			} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
   106 			} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
   107 		}
   107 		}
   108 		addRelation(c, currentRelation); // last relation
   108 		addRelation(c, currentRelation); // last relation
   109 
   109 
       
   110 		if (c.relationConfigurations.size() == 0) throw relpipe::cli::RelpipeCLIException(L"There must be at least one relation. Use the " + OPTION_RELATION + L" option.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
       
   111 		for (auto& rc : c.relationConfigurations) if (rc.attributes.size() == 0) throw relpipe::cli::RelpipeCLIException(L"There must be at least one attribute. Use the " + OPTION_ATTRIBUTE + L" option.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
       
   112 
   110 		return c;
   113 		return c;
   111 	}
   114 	}
   112 
   115 
   113 	virtual ~CLIParser() {
   116 	virtual ~CLIParser() {
   114 	}
   117 	}