//LOG4CPLUS_DEBUG(logger,"Argument::~Argument: Destructing Argument \""<<this->getArgumentName()<<"\" of Type "<<ArgumentTypeHelper::toString(this->getArgumentType()));
LOG4CPLUS_ERROR(logger,"Argument::unify: While unifying argument \""<<this->getArgumentName()<<"\" and argument \""<<rhs.getArgumentName()<<"\": Types do not match (\""<<ArgumentTypeHelper::toString(this->getArgumentType())<<"\" and \""<<ArgumentTypeHelper::toString(rhs.getArgumentType())<<"\").");
throwstorm::exceptions::ArgumentUnificationException()<<"While unifying Argument \""<<this->getArgumentName()<<"\" and argument \""<<rhs.getArgumentName()<<"\": Types do not match (\""<<ArgumentTypeHelper::toString(this->getArgumentType())<<"\" and \""<<ArgumentTypeHelper::toString(rhs.getArgumentType())<<"\").";
}
if(this->getIsOptional()!=rhs.getIsOptional()){
LOG4CPLUS_ERROR(logger,"Argument::unify: While unifying argument \""<<this->getArgumentName()<<"\" and argument \""<<rhs.getArgumentName()<<"\": Both must either be optional or non-optional.");
throwstorm::exceptions::ArgumentUnificationException()<<"While unifying argument \""<<this->getArgumentName()<<"\" and argument \""<<rhs.getArgumentName()<<"\": Both must either be optional or non-optional.";
LOG4CPLUS_WARN(logger,"Argument::unify: While unifying argument \""<<this->getArgumentName()<<"\" and argument \""<<rhs.getArgumentName()<<"\": Mismatching descriptions.");
LOG4CPLUS_WARN(logger,"Argument::unify: While unifying argument \""<<this->getArgumentName()<<"\" and argument \""<<rhs.getArgumentName()<<"\": Mismatching descriptions.");
LOG4CPLUS_ERROR(logger,"Argument::getArgumentValue: Unable to retrieve argument of option \""<<this->getArgumentName()<<"\", because it was never set and does not specify a default value.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to retrieve argument of option \""<<this->getArgumentName()<<"\", because it was never set and does not specify a default value.";
}
boolisCompatibleWith(Argument<S>const&other){
LOG_THROW(this->getArgumentType()==other.getArgumentType(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getArgumentName()<<" and "<<other.getArgumentName()<<", because they have different types.");
LOG_THROW(this->getIsOptional()!=other.getIsOptional(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getArgumentName()<<" and "<<other.getArgumentName()<<", because one of them is optional and the other one is not.");
LOG_THROW(this->getHasDefaultValue()!=other.getHasDefaultValue(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getArgumentName()<<" and "<<other.getArgumentName()<<", because one of them has a default value and the other one does not.");
LOG_THROW(this->getHasBeenSet(),storm::exceptions::IllegalFunctionCallException,"Unable to retrieve value of argument, because it was not set.");
returnthis->argumentValue;
}
virtualboolgetHasDefaultValue()constoverride{
returnthis->hasDefaultValue;
}
std::stringconst&getDefaultValue(){
returnthis->defaultValue;
}
voidsetFromDefaultValue()override{
if(!this->hasDefaultValue){
LOG4CPLUS_ERROR(logger,"Argument::setFromDefaultValue: Unable to retrieve default value for argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<").");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to retrieve default value for argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<").";
LOG4CPLUS_ERROR(logger,"Argument::setFromDefaultValue: Unable to assign default value to argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<"), because default value was rejected ("<<result.second<<").");
throwstorm::exceptions::IllegalArgumentValueException()<<"Unable to assign default value to argument \""<<this->getArgumentName()<<"\" ("<<this->getArgumentDescription()<<"), because default value was rejected ("<<result.second<<").";
}
LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to set value from default value, because the argument has none.");
LOG4CPLUS_ERROR(logger,"Argument::getValueAsInteger(): Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as integer.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as integer.";
LOG4CPLUS_ERROR(logger,"Argument::getValueAsUnsignedInteger(): Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as unsigned integer.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as unsigned integer.";
LOG4CPLUS_ERROR(logger,"Argument::getValueAsDouble(): Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as double.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as double.";
LOG4CPLUS_ERROR(logger,"Argument::getValueAsBoolean(): Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as boolean.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to retrieve value of argument \""<<getArgumentName()<<"\" of type \""<<ArgumentTypeHelper::toString(getArgumentType())<<"\" as boolean.";
LOG4CPLUS_ERROR(logger,"Argument::setDefaultValue: Illegal default value for argument \""<<this->getArgumentName()<<"\"."<<std::endl<<"The validation function rejected the value ("<<errorText<<").");
throwstorm::exceptions::IllegalArgumentValueException()<<"Illegal default value for argument \""<<this->getArgumentName()<<"\". The validation function rejected the value ("<<errorText<<").";
LOG_THROW(this->validate(newDefault),storm::exceptions::IllegalArgumentValueException,"The default value for the argument did not pass all validation functions.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to add a validation function for a \""<<ArgumentTypeHelper::toString(ArgumentType::funcName)<<"\" argument, because this argument is of type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".";\
throwstorm::exceptions::IllegalArgumentValueException()<<"Unable to add a validation function for an argument that has a default value which is rejected by this validation function:\r\n"<<errorMessageTarget<<".";\
}\
return*this;\
}
LOG_THROW(this->argumentType==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal validation function for argument, because it takes arguments of different type.")\
throwstorm::exceptions::IllegalFunctionCallException()<<"Unable to add a default value for a \""<<ArgumentTypeHelper::toString(ArgumentType::String)<<"\" argument, because the argument \""<<this->argumentName<<"\" is of type \""<<ArgumentTypeHelper::toString(this->argumentType)<<"\".";\
throwstorm::exceptions::IllegalArgumentValueException()<<"Unable to add a default value for the argument \""<<this->argumentName<<"\", but a validation function rejected it:\r\n"<<errorMessageTarget<<".";\
}\
this->hasDefaultValue=true;\
return*this;\
}
LOG_THROW(this->argumentType==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal default value for argument"<<this->argumentName<<", because it is of different type.")\
LOG_THROW(!this->hasBeenBuilt,storm::exceptions::IllegalFunctionCallException,"Cannot rebuild argument with builder that was already used to build an argument.");
LOG_THROW(this->getArgumentCount()==other.getArgumentCount(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their argument count differs.");
LOG4CPLUS_ERROR(logger,"Option::unify: Unable to unify option \""<<getLongName()<<"\" because of mismatching names (\""<<getLongName()<<"\" and \""<<other.getLongName()<<"\").");
throwstorm::exceptions::OptionUnificationException()<<"Unable to unify option \""<<getLongName()<<"\" because of mismatching names (\""<<getLongName()<<"\" and \""<<other.getLongName()<<"\").";
LOG4CPLUS_ERROR(logger,"Option::unify: Unable to unify option \""<<getLongName()<<"\" because of mismatching names (\""<<getShortName()<<"\" and \""<<other.getShortName()<<"\").");
throwstorm::exceptions::OptionUnificationException()<<"Unable to unify option \""<<getLongName()<<"\" because of mismatching names (\""<<getShortName()<<"\" and \""<<other.getShortName()<<"\").";
LOG4CPLUS_ERROR(logger,"Option::unify: Unable to unify option \""<<getLongName()<<"\" because of mismatching argument types at index "<<i<<".");
throwstorm::exceptions::OptionUnificationException()<<"Unable to unify option \""<<getLongName()<<"\" because of mismatching argument types at index "<<i<<".";
}
LOG_THROW(firstArgument.getArgumentType()==secondArgument.getArgumentType(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their arguments are incompatible.");
LOG4CPLUS_ERROR(logger,"Option::getArgumentByName: Unable to retrieve unknown argument \""<<argumentName<<"\" of option \""<<this->getLongName()<<"\".");
throwstorm::exceptions::IllegalArgumentException()<<"Unable to retrieve unknown argument \""<<argumentName<<"\" of option \""<<this->getLongName()<<"\".";
}
return*argumentIterator->second.get();
LOG_THROW(argumentIterator!=this->argumentNameMap.end(),storm::exceptions::IllegalArgumentException,"Unable to retrieve argument with unknown name "<<argumentName<<".");
//throwstorm::exceptions::IllegalArgumentException()<<"Error: The Argument Vector specified for Option \""<<getLongName()<<"\" is invalid!\nIt contains an argument without a default value, but the containing option is optional and therefor requires all arguments to provide default values.";
LOG4CPLUS_ERROR(logger,"Option::isArgumentsVectorValid: The argument vector specified for option \""<<getLongName()<<"\" is invalid, because it contains a non-optional argument after an optional one.");
throwstorm::exceptions::IllegalArgumentException()<<"The argument vector specified for option \""<<getLongName()<<"\" is invalid, because it contains a non-optional argument after an optional one.";
LOG4CPLUS_ERROR(logger,"Option::isArgumentsVectorValid: The argument vector specified for option \""<<getLongName()<<"\" is invalid, because it contains two arguments with the same name.");
throwstorm::exceptions::IllegalArgumentException()<<"The argument vector specified for option \""<<getLongName()<<"\" is invalid, because it contains two arguments with the same name.";
LOG_THROW(!this->isBuild,storm::exceptions::IllegalFunctionCallException,"Cannot add an argument to an option builder that was already used to build the option.");
LOG_THROW(this->arguments.empty()||!argument->getIsOptional()||this->arguments.back()->getIsOptional(),storm::exceptions::IllegalArgumentException,"Unable to add non-optional argument after an option that is optional.");
LOG_THROW(argumentNamSet.find(lowerArgumentName)==argumentNameSet.end(),storm::exceptions::IllegalArgumentException,"Unable to add argument to option, because it already has an argument with the same name.");
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Illegal call to addArgument() on an instance of OptionBuilder that has already built an instance.");
throwstorm::exceptions::IllegalFunctionCallException()<<"Illegal call to addArgument() on an instance of OptionBuilder that has already built an instance.";
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Unable to add a non-optional argument to option \""<<getLongName()<<"\", because it already contains an optional argument.");
throwstorm::exceptions::IllegalArgumentException()<<"Unable to add non-optional argument to option \""<<getLongName()<<"\", because it already contains an optional argument.";
LOG4CPLUS_ERROR(logger,"OptionBuilder::addArgument: Unable to add argument with name \""<<newArgument->getArgumentName()<<"\" to option \""<<getLongName()<<"\", because it already contains an argument with the same name.");
throwstorm::exceptions::IllegalArgumentException()<<"Unable to add argument with name \""<<newArgument->getArgumentName()<<"\" to option \""<<getLongName()<<"\", because it already contains an argument with the same name.";
xxxxxxxxxx