mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
Indicate at which point of the text stream is the failure
This commit is contained in:
parent
bf39356027
commit
4f9fd340f0
1 changed files with 6 additions and 1 deletions
|
@ -134,11 +134,15 @@ bool loadZobov(const char *descName, const char *adjName, const char *voidsName,
|
|||
}
|
||||
|
||||
cout << "Loading description" << endl;
|
||||
int lineid = 1;
|
||||
|
||||
string line;
|
||||
getline(descFile, line);
|
||||
lineid++;
|
||||
getline(descFile, line);
|
||||
lineid++;
|
||||
getline(descFile, line);
|
||||
lineid++;
|
||||
while (!descFile.eof())
|
||||
{
|
||||
istringstream lineStream(line.c_str());
|
||||
|
@ -160,7 +164,7 @@ bool loadZobov(const char *descName, const char *adjName, const char *voidsName,
|
|||
>> probability;
|
||||
if (!lineStream)
|
||||
{
|
||||
cerr << "Error in text stream" << endl;
|
||||
cerr << "Error in text stream at line " << lineid << endl;
|
||||
abort();
|
||||
}
|
||||
|
||||
|
@ -187,6 +191,7 @@ bool loadZobov(const char *descName, const char *adjName, const char *voidsName,
|
|||
<< actualNumber << ")" << endl;
|
||||
}
|
||||
getline(descFile, line);
|
||||
lineid++;
|
||||
}
|
||||
|
||||
cout << "Done loading" << endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue