- throw TokenException( string("Tried to read a string from ") + this->getLineage() + string(" but there no more elements") );
+ throw TokenException( getFileName() + ":" + string("Tried to read a string from ") + this->getLineage() + string(" but there no more elements") );
}
rhs = l->getName();
// rhs = getName();
return *this;
}
Token & Token::operator>>( int & rhs ) throw( TokenException ){
Token * l = readToken();
if ( l == NULL ){
- throw TokenException(string("Tried to read an int from ") + this->getLineage() + string(" but there are no more elements") );
+ throw TokenException( getFileName() + ": " + string("Tried to read an int from ") + this->getLineage() + string(" but there are no more elements") );