mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Generate a graceful error message instead of a Segmentation Fault
This commit is contained in:
parent
e63a9f5021
commit
189fa22c6b
1 changed files with 5 additions and 0 deletions
|
@ -395,6 +395,11 @@ void saveBox(SimuData *&boxed, const std::string& outbox)
|
||||||
int num_snapshots = *boxed->as<int>("num_snapshots");
|
int num_snapshots = *boxed->as<int>("num_snapshots");
|
||||||
long *uniqueID = boxed->as<long>("uniqueID");
|
long *uniqueID = boxed->as<long>("uniqueID");
|
||||||
|
|
||||||
|
if (!f.is_valid())
|
||||||
|
{
|
||||||
|
cerr << "Could not create parameter file '" << outbox << "'. Aborting." << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
f.add_att("range_x_min", ranges[0]);
|
f.add_att("range_x_min", ranges[0]);
|
||||||
f.add_att("range_x_max", ranges[1]);
|
f.add_att("range_x_max", ranges[1]);
|
||||||
f.add_att("range_y_min", ranges[2]);
|
f.add_att("range_y_min", ranges[2]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue