throwstorm::exceptions::IllegalArgumentException()<<"Error: The Argument \""<<argumentName<<"\" is flaged as optional but no default value was given!";
LOG4CPLUS_ERROR(logger,"Argument::Argument: The Argument \""<<argumentName<<"\" is flaged as optional but no default value was given!");
throwstorm::exceptions::IllegalArgumentException()<<"The Argument \""<<argumentName<<"\" is flaged as optional but no default value was given!";
}
}
@ -57,7 +62,7 @@ namespace storm {
}
virtual~Argument(){
std::cout<<"Destructing an Argument: "<<this->getArgumentName()<<" of Type "<<ArgumentTypeHelper::toString(this->getArgumentType())<<std::endl;
//LOG4CPLUS_DEBUG(logger,"Argument::~Argument: Destructing Argument \""<<this->getArgumentName()<<"\" of Type "<<ArgumentTypeHelper::toString(this->getArgumentType()));
throwstorm::exceptions::ArgumentUnificationException()<<"Error while unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": Type Missmatch: \""<<ArgumentTypeHelper::toString(this->getArgumentType())<<"\" against \""<<ArgumentTypeHelper::toString(rhs.getArgumentType())<<"\"";
LOG4CPLUS_ERROR(logger,"Argument::unify: While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": Type Missmatch: \""<<ArgumentTypeHelper::toString(this->getArgumentType())<<"\" against \""<<ArgumentTypeHelper::toString(rhs.getArgumentType())<<"\"");
throwstorm::exceptions::ArgumentUnificationException()<<"While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": Type Missmatch: \""<<ArgumentTypeHelper::toString(this->getArgumentType())<<"\" against \""<<ArgumentTypeHelper::toString(rhs.getArgumentType())<<"\"";
}
if(this->getIsOptional()!=rhs.getIsOptional()){
//LOG
throwstorm::exceptions::ArgumentUnificationException()<<"Error while unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": IsOptional Missmatch!";
LOG4CPLUS_ERROR(logger,"Argument::unify: While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": IsOptional Missmatch!");
throwstorm::exceptions::ArgumentUnificationException()<<"While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": IsOptional Missmatch!";
throwstorm::exceptions::ArgumentUnificationException()<<"Error while unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": defaultValue Missmatch!";
LOG4CPLUS_ERROR(logger,"Argument::unify: While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": defaultValue Missmatch!");
throwstorm::exceptions::ArgumentUnificationException()<<"While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": defaultValue Missmatch!";
LOG4CPLUS_WARN(logger,"Argument::unify: While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": descriptions Missmatch!");
LOG4CPLUS_WARN(logger,"Argument::unify: While unifying Argument \""<<this->getArgumentName()<<"\" and Argument \""<<rhs.getArgumentName()<<"\": ArgumentName Missmatch!");
}
//AddValidationfunctions
@ -128,8 +133,8 @@ namespace storm {
TgetArgumentValue()const{
if(!this->getHasBeenSet()){
//LOG
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: Called getArgumentValue() on Argument \""<<this->getArgumentName()<<"\", but it was never set and does not contain a default value.";
LOG4CPLUS_ERROR(logger,"Argument::getArgumentValue: Called getArgumentValue() on Argument \""<<this->getArgumentName()<<"\", but it was never set and does not contain a default value.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Called getArgumentValue() on Argument \""<<this->getArgumentName()<<"\", but it was never set and does not contain a default value.";
}
returnthis->argumentValue;
}
@ -144,12 +149,14 @@ namespace storm {
voidsetFromDefaultValue()override{
if(!this->hasDefaultValue){
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: The Argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<") was asked to set its default value but none was set!";
LOG4CPLUS_ERROR(logger,"Argument::setFromDefaultValue: The Argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<") was asked to set its default value but none was set!");
throwstorm::exceptions::IllegalFunctionCallException()<<"The Argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<") was asked to set its default value but none was set!";
throwstorm::exceptions::IllegalArgumentValueException()<<"Error: While parsing a given configuration the Argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<") could not receive its Default Value as it was rejected by its Validation Functions with message: "<<result.second;
LOG4CPLUS_ERROR(logger,"Argument::setFromDefaultValue: While parsing a given configuration the Argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<") could not receive its Default Value as it was rejected by its Validation Functions with message: "<<result.second);
throwstorm::exceptions::IllegalArgumentValueException()<<"While parsing a given configuration the Argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<") could not receive its Default Value as it was rejected by its Validation Functions with message: "<<result.second;
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: getValueAsInteger() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!";
default:{
LOG4CPLUS_ERROR(logger,"Argument::getValueAsInteger() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!");
throwstorm::exceptions::IllegalFunctionCallException()<<"getValueAsInteger() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!";
LOG4CPLUS_ERROR(logger,"Argument::getValueAsUnsignedInteger() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!");
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: getValueAsUnsignedInteger() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!";
LOG4CPLUS_ERROR(logger,"Argument::getValueAsDouble() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!");
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: getValueAsDouble() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!";
LOG4CPLUS_ERROR(logger,"Argument::getValueAsBoolean() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!");
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: getValueAsBoolean() was called on Argument \""<<getArgumentName()<<"\" of Type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\"!";
LOG4CPLUS_ERROR(logger,"Argument::setDefaultValue: Illegal Default Value for Argument \""<<this->getArgumentName()<<"\".\nThe Validation Function rejected the Value: "<<errorText);
throwstorm::exceptions::IllegalArgumentValueException()<<"Illegal Default Value for Argument \""<<this->getArgumentName()<<"\".\nThe Validation Function rejected the Value: "<<errorText;
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: You tried adding a Validation-Function for a \""<<ArgumentTypeHelper::toString(ArgumentType::funcName)<<"\" Argument, but this Argument is configured to be of Type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".";\
LOG4CPLUS_ERROR(logger,"ArgumentBuilder::addValidationFunction: Tried adding a Validation-Function for a \""<<ArgumentTypeHelper::toString(ArgumentType::funcName)<<"\" Argument, but this Argument is configured to be of Type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".");\
throwstorm::exceptions::IllegalFunctionCallException()<<"Tried adding a Validation-Function for a \""<<ArgumentTypeHelper::toString(ArgumentType::funcName)<<"\" Argument, but this Argument is configured to be of Type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".";\
throwstorm::exceptions::IllegalArgumentValueException()<<"Error: You tried adding a Validation-Function for an Argument which has a Default Value set which is rejected by this Validation-Function:\r\n"<<errorMessageTarget;\
LOG4CPLUS_ERROR(logger,"ArgumentBuilder::addValidationFunction: Tried adding a Validation-Function for an Argument which has a Default Value set which is rejected by this Validation-Function:\r\n"<<errorMessageTarget);\
throwstorm::exceptions::IllegalArgumentValueException()<<"Tried adding a Validation-Function for an Argument which has a Default Value set which is rejected by this Validation-Function:\r\n"<<errorMessageTarget;\
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: You tried adding a default Value for a \""<<ArgumentTypeHelper::toString(ArgumentType::String)<<"\" Argument, but the Argument \""<<this->argumentName<<"\" is configured to be of Type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".";\
LOG4CPLUS_ERROR(logger,"ArgumentBuilder::addValidationFunction: Tried adding a default Value for a \""<<ArgumentTypeHelper::toString(ArgumentType::String)<<"\" Argument, but the Argument \""<<this->argumentName<<"\" is configured to be of Type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".");\
throwstorm::exceptions::IllegalFunctionCallException()<<"Tried adding a default Value for a \""<<ArgumentTypeHelper::toString(ArgumentType::String)<<"\" Argument, but the Argument \""<<this->argumentName<<"\" is configured to be of Type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".";\
throwstorm::exceptions::IllegalArgumentValueException()<<"Error: You tried adding a default Value for the Argument \""<<this->argumentName<<"\", but a Validation Function rejected it:\r\n"<<errorMessageTarget;\
LOG4CPLUS_ERROR(logger,"ArgumentBuilder::setDefaultValue: Tried adding a default Value for the Argument \""<<this->argumentName<<"\", but a Validation Function rejected it:\r\n"<<errorMessageTarget);\
throwstorm::exceptions::IllegalArgumentValueException()<<"Tried adding a default Value for the Argument \""<<this->argumentName<<"\", but a Validation Function rejected it:\r\n"<<errorMessageTarget;\
}\
this->hasDefaultValue=true;\
return*this;\
@ -113,8 +121,8 @@ namespace storm {
ArgumentBase*build(){
if(this->hasBeenBuild){
//LOG
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: Called build() on an instance of ArgumentBuilder which has already build an Instance.";
LOG4CPLUS_ERROR(logger,"ArgumentBuilder::build: Called build() on an instance of ArgumentBuilder which has already build an Instance.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Called build() on an instance of ArgumentBuilder which has already build an Instance.";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"Missing a Switch Case in the ArgumentTypeHelper!\n"<<"It seems there is a new ArgumentType, but it was not added to the Helper Class!";
default:{
LOG4CPLUS_ERROR(logger,"ArgumentTypeHelper::toString: Missing Case in ArgumentTypeHelper's switch/case Code.");
throwstorm::exceptions::InternalTypeErrorException()<<"Missing a Switch Case in the ArgumentTypeHelper!\n"<<"It seems there is a new ArgumentType, but it was not added to the Helper Class!";
//"Missing Template Specialization Case in ArgumentTypeInferation"
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"Missing a Template Specialization Case in the ArgumentTypeInferationHelper!\n"<<"It seems you tried to use a new, non-standard Type as a Settings Parameter-Type!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToEnumType: Missing a Template Specialization Case in the ArgumentTypeInferationHelper! It seems you tried to use a new, non-standard Type as a Settings Parameter-Type!");
throwstorm::exceptions::InternalTypeErrorException()<<"Missing a Template Specialization Case in the ArgumentTypeInferationHelper!\n"<<"It seems you tried to use a new, non-standard Type as a Settings Parameter-Type!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToString was called on a non-string Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToString: inferToString was called on a non-string Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToString was called on a non-string Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToString was called on a string Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToString: inferToString was called on a string Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToString was called on a string Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToInteger was called on a non-int_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToInteger: inferToInteger was called on a non-int_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToInteger was called on a non-int_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToInteger was called on an int_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToInteger: inferToInteger was called on a int_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToInteger was called on an int_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToUnsignedInteger was called on a non-uint_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToUnsignedInteger: inferToUnsignedInteger was called on a non-uint_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToUnsignedInteger was called on a non-uint_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToUnsignedInteger was called on an uint_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToUnsignedInteger: inferToUnsignedInteger was called on a uint_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToUnsignedInteger was called on an uint_fast64_t Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToDouble was called on a non-double Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToDouble: inferToDouble was called on a non-double Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToDouble was called on a non-double Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToDouble was called on a double Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToDouble: inferToDouble was called on a double Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToDouble was called on a double Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToBoolean was called on a non-bool Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToBoolean: inferToBoolean was called on a non-bool Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToBoolean was called on a non-bool Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::InternalTypeErrorException()<<"ERROR:\n"<<"inferToBoolean was called on a bool Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
LOG4CPLUS_ERROR(logger,"ArgumentTypeInferation::inferToBoolean: inferToBoolean was called on a bool Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!");
throwstorm::exceptions::InternalTypeErrorException()<<"inferToBoolean was called on a bool Template Object to cast to "<<ArgumentTypeHelper::toString(argumentType)<<"!";
throwstorm::exceptions::OptionUnificationException()<<"Error: Could not unify Option \""<<getLongName()<<"\" because the Names are different (\""<<getLongName()<<"\" vs. \""<<other.getLongName()<<"\")!";
LOG4CPLUS_ERROR(logger,"Option::unify: Could not unify Option \""<<getLongName()<<"\" because the Names are different (\""<<getLongName()<<"\" vs. \""<<other.getLongName()<<"\")!");
throwstorm::exceptions::OptionUnificationException()<<"Could not unify Option \""<<getLongName()<<"\" because the Names are different (\""<<getLongName()<<"\" vs. \""<<other.getLongName()<<"\")!";
throwstorm::exceptions::OptionUnificationException()<<"Error: Could not unify Option \""<<getLongName()<<"\" because the Shortnames are different (\""<<getShortName()<<"\" vs. \""<<other.getShortName()<<"\")!";
LOG4CPLUS_ERROR(logger,"Option::unify: Could not unify Option \""<<getLongName()<<"\" because the Shortnames are different (\""<<getShortName()<<"\" vs. \""<<other.getShortName()<<"\")!");
throwstorm::exceptions::OptionUnificationException()<<"Could not unify Option \""<<getLongName()<<"\" because the Shortnames are different (\""<<getShortName()<<"\" vs. \""<<other.getShortName()<<"\")!";
throwstorm::exceptions::OptionUnificationException()<<"Error: Could not unify Option \""<<getLongName()<<"\" because the Argument Counts are different!";
LOG4CPLUS_ERROR(logger,"Option::unify: Could not unify Option \""<<getLongName()<<"\" because the Argument Counts are different!");
throwstorm::exceptions::OptionUnificationException()<<"Could not unify Option \""<<getLongName()<<"\" because the Argument Counts are different!";
}
for(autoi=0;i!=this->arguments.size();i++){
ArgumentBase*A=this->arguments.at(i).get();
ArgumentBase*B=other.arguments.at(i).get();
if(A->getArgumentType()!=B->getArgumentType()){
//LOG
throwstorm::exceptions::OptionUnificationException()<<"Error: Could not unify Option \""<<getLongName()<<"\" because the Argument Types at Index "<<i<<" are different!";
LOG4CPLUS_ERROR(logger,"Option::unify: Could not unify Option \""<<getLongName()<<"\" because the Argument Types at Index "<<i<<" are different!");
throwstorm::exceptions::OptionUnificationException()<<"Could not unify Option \""<<getLongName()<<"\" because the Argument Types at Index "<<i<<" are different!";
LOG4CPLUS_ERROR(logger,"Option::getArgumentByName: The Option \""<<this->getLongName()<<"\" does not contain an Argument with Name \""<<argumentName<<"\"!");
throwstorm::exceptions::IllegalArgumentException()<<"The Option \""<<this->getLongName()<<"\" does not contain an Argument with Name \""<<argumentName<<"\"!";
}
@ -207,21 +201,25 @@ namespace storm {
voidvalidateFields()const{
if(longName.empty()){
throwstorm::exceptions::IllegalArgumentException()<<"Error: Tried constructing an Option with an empty longName field!";
LOG4CPLUS_ERROR(logger,"Option::validateFields: Tried constructing an Option with an empty longName field!");
throwstorm::exceptions::IllegalArgumentException()<<"Tried constructing an Option with an empty longName field!";
}
if(moduleName.empty()){
throwstorm::exceptions::IllegalArgumentException()<<"Error: Tried constructing an Option with an empty moduleName field!";
LOG4CPLUS_ERROR(logger,"Option::validateFields: Tried constructing an Option with an empty moduleName field!");
throwstorm::exceptions::IllegalArgumentException()<<"Tried constructing an Option with an empty moduleName field!";
throwstorm::exceptions::IllegalArgumentException()<<"Error: The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid!\nIt contains a non-optional argument AFTER an optional argument.";
LOG4CPLUS_ERROR(logger,"Option::isArgumentsVectorValid: The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid! It contains a non-optional argument AFTER an optional argument.");
throwstorm::exceptions::IllegalArgumentException()<<"The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid!It contains a non-optional argument AFTER an optional argument.";
throwstorm::exceptions::IllegalArgumentException()<<"Error: The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid!\nIt contains two arguments with the same name.";
LOG4CPLUS_ERROR(logger,"Option::isArgumentsVectorValid: The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid!\nIt contains two arguments with the same name.");
throwstorm::exceptions::IllegalArgumentException()<<"The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid!\nIt contains two arguments with the same name.";
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: Called addArgument() on an instance of OptionBuilder which has already build an Instance.";
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Called addArgument() on an instance of OptionBuilder which has already build an Instance.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Called addArgument() on an instance of OptionBuilder which has already build an Instance.";
throwstorm::exceptions::IllegalArgumentException()<<"Error: Could not add Non-Optional Argument to Option \""<<getLongName()<<"\" because it already contains an optional argument! Please note that after an optional argument has been added only arguments which are also optional can be appended.";
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Could not add Non-Optional Argument to Option \""<<getLongName()<<"\" because it already contains an optional argument! Please note that after an optional argument has been added only arguments which are also optional can be appended.");
throwstorm::exceptions::IllegalArgumentException()<<"Could not add Non-Optional Argument to Option \""<<getLongName()<<"\" because it already contains an optional argument! Please note that after an optional argument has been added only arguments which are also optional can be appended.";
throwstorm::exceptions::IllegalArgumentException()<<"Error: Could not add Argument with Name \""<<newArgument->getArgumentName()<<"\" to Option \""<<getLongName()<<"\" because it already contains an argument with the same name! Please note that all argument names must be unique in its respective option.";
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Could not add Argument with Name \""<<newArgument->getArgumentName()<<"\" to Option \""<<getLongName()<<"\" because it already contains an argument with the same name! Please note that all argument names must be unique in its respective option.");
throwstorm::exceptions::IllegalArgumentException()<<"Could not add Argument with Name \""<<newArgument->getArgumentName()<<"\" to Option \""<<getLongName()<<"\" because it already contains an argument with the same name! Please note that all argument names must be unique in its respective option.";
}
argumentNameSet.insert(lowerArgumentName);
@ -115,8 +113,8 @@ namespace storm {
Option*build(){
if(this->isBuild){
//LOG
throwstorm::exceptions::IllegalFunctionCallException()<<"Error: Called build() on an instance of OptionBuilder which has already build an Instance.";
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Called build() on an instance of OptionBuilder which has already build an Instance.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Called build() on an instance of OptionBuilder which has already build an Instance.";
LOG4CPLUS_ERROR(logger,"Settings::handleAssignment: Could not parse Arguments for Option \""<<longOptionName<<"\": "<<arguments.size()<<" Arguments given, but max. "<<option->getArgumentCount()<<" Arguments expected.");
throwstorm::exceptions::OptionParserException()<<"Could not parse Arguments for Option \""<<longOptionName<<"\": "<<arguments.size()<<" Arguments given, but max. "<<option->getArgumentCount()<<" Arguments expected.";
LOG4CPLUS_ERROR(logger,"Settings::handleAssignment: Could not parse Arguments for Option \""<<longOptionName<<"\": Argument "<<option->getArgument(i).getArgumentName()<<" rejected the given Value \""<<arguments.at(i)<<"\" with Message:\r\n"<<assignmentResult.second);
throwstorm::exceptions::OptionParserException()<<"Could not parse Arguments for Option \""<<longOptionName<<"\": Argument "<<option->getArgument(i).getArgumentName()<<" rejected the given Value \""<<arguments.at(i)<<"\" with Message:\r\n"<<assignmentResult.second;
}
}else{
// There is no given value for this argument, only optional
if(!option->getArgument(i).getIsOptional()){
// LOG
LOG4CPLUS_ERROR(logger,"Settings::handleAssignment: Could not parse Arguments for Option \""<<longOptionName<<"\": "<<arguments.size()<<" Arguments given, but more Arguments were expected.");
throwstorm::exceptions::OptionParserException()<<"Could not parse Arguments for Option \""<<longOptionName<<"\": "<<arguments.size()<<" Arguments given, but more Arguments were expected.";
LOG4CPLUS_ERROR(logger,"Settings::parseCommandLine: Found a stray argument while parsing a given configuration: \""<<stringArgv.at(i)<<"\" is neither a known Option nor preceeded by an Option.");
throwstorm::exceptions::OptionParserException()<<"Found a stray argument while parsing a given configuration: \""<<stringArgv.at(i)<<"\" is neither a known Option nor preceeded by an Option.";
// There exists an option which uses the same shortname
//LOG
//LOG4CPLUS_ERROR(logger, "Settings::addOption: Error: The Option \"" << shortNameIterator->second << "\" from Module \"" << this->options.find(shortNameIterator->second)->second.get()->getModuleName() << "\" uses the same ShortName as the Option \"" << option->getLongName() << "\" from Module \"" << option->getModuleName() << "\"!");
throwstorm::exceptions::OptionUnificationException()<<"Error: The Option \""<<shortNameIterator->second<<"\" from Module \""<<this->options.find(shortNameIterator->second)->second.get()->getModuleName()<<"\" uses the same ShortName as the Option \""<<option->getLongName()<<"\" from Module \""<<option->getModuleName()<<"\"!";