LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": File does not exist or is not readable.");
throwstorm::exceptions::FileIoException()<<"The supplied Labeling input file \""<<filename<<"\" does not exist or is not readable by this process.";
LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": The supplied Labeling input file does not exist or is not readable by this process.");
throwstorm::exceptions::FileIoException()<<"Error while parsing "<<filename<<": The supplied Labeling input file does not exist or is not readable by this process.";
}
MappedFilefile(filename.c_str());
@ -68,10 +68,10 @@ namespace storm {
// If #DECLARATION or #END have not been found, the file format is wrong.
if(!(foundDecl&&foundEnd)){
LOG4CPLUS_ERROR(logger,"Wrong file format in ("<<filename<<"). File header is corrupted.");
LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": File header is corrupted (#DECLARATION or #END missing - case sensitive).");
if(!foundDecl)LOG4CPLUS_ERROR(logger,"\tDid not find #DECLARATION token.");
if(!foundEnd)LOG4CPLUS_ERROR(logger,"\tDid not find #END token.");
throwstorm::exceptions::WrongFormatException();
throwstorm::exceptions::WrongFormatException()<<"Error while parsing "<<filename<<": File header is corrupted (#DECLARATION or #END missing - case sensitive).";
}
@ -100,8 +100,8 @@ namespace storm {
if(cnt>=sizeof(proposition)){
// if token is longer than our buffer, the following strncpy code might get risky...
LOG4CPLUS_ERROR(logger,"Wrong file format in ("<<filename<<"). Atomic proposition with length > "<<(sizeof(proposition)-1)<<" was found.");
throwstorm::exceptions::WrongFormatException();
LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": Atomic proposition with length > "<<(sizeof(proposition)-1)<<" was found.");
throwstorm::exceptions::WrongFormatException()<<"Error while parsing "<<filename<<": Atomic proposition with length > "<<(sizeof(proposition)-1)<<" was found.";
}elseif(cnt>0){
@ -127,6 +127,7 @@ namespace storm {
uint_fast64_tstate=0;
uint_fast64_tlastState=(uint_fast64_t)-1;
uint_fast64_tconststartIndexComparison=lastState;
cnt=0;
// Now parse the assignments of labels to nodes.
@ -137,9 +138,9 @@ namespace storm {
state=checked_strtol(buf,&buf);
// If the state has already been read or skipped once there might be a problem with the file (doubled lines, or blocks).
LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": State "<<state<<" was found but has already been read or skipped previously.");
throwstorm::exceptions::WrongFormatException()<<"Error while parsing "<<filename<<": State "<<state<<" was found but has already been read or skipped previously.";
// If the state has already been read or skipped once there might be a problem with the file (doubled lines, or blocks).
// Note: The value -1 shows that lastState has not yet been set, i.e. this is the first run of the loop (state index (2^64)-1 is a really bad starting index).
LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": State "<<state<<" was found but has already been read or skipped previously.");
throwstorm::exceptions::WrongFormatException()<<"Error while parsing "<<filename<<": State "<<state<<" was found but has already been read or skipped previously.";
}
if(stateCount<=state){
LOG4CPLUS_ERROR(logger,"Found reward for a state of an invalid index \""<<state<<"\". The model has only "<<stateCount<<" states.");
throwstorm::exceptions::OutOfRangeException()<<"Found reward for a state of an invalid index \""<<state<<"\"";
LOG4CPLUS_ERROR(logger,"Error while parsing "<<filename<<": Found reward for a state of an invalid index \""<<state<<"\". The model has only "<<stateCount<<" states.");
throwstorm::exceptions::OutOfRangeException()<<"Error while parsing "<<filename<<": Found reward for a state of an invalid index \""<<state<<"\"";
}
reward=checked_strtod(buf,&buf);
if(reward<0.0){
LOG4CPLUS_ERROR(logger,"Expected positive reward value but got \""<<reward<<"\".");