Hey,
I had some time again to play around with 3D noise.
And while doing so, I had multiple crashes in PolyVox.
Or, rather, I WISH I had crashes, so I could jump in with gdb and debug them. Instead, the application just quits. No chance to find out where the error actually came from.
Code:
std::exit
Is something that IMO should never, never, never, never, never be used in a library. It is assuming that the user wants to quit the application if there is an error. Something which is very dangerous (as it removes the possibility to do proper debugging) in your own application, and even more hazardous in an external library such as PolyVox.
A crash is far more helpful than an application quitting silently.
On some occasions, I could find that something like "NaN after normalize" (don't remember exactly) was printed to the console, together with the file in which it happened, but no trace, variable values, etc.
But it did not really help me figuring out where the actual problem was.
So, if PolyVox knows that something will not work out, printing that knowledge is fine and helpful, but silently quitting the application instead of letting it crash is something I actually consider very harmful.