Idea exception handling
Its just an idea and probably a matter of personal feelings but I had an idea about setting up the Assert error handler to behave like OpenGL does if possible and instead of breaking the program Logging all errors to be retrieved by an error handler. Obviously major errors would still crash it but if its a matter of small, like one of the objects is 0,0,0 or something is off then to Assert to the Log and continue on ignoring that specific object, I just feel like this might be easier to get ones feet wet if they had SOMETHING working instead of nothing. I have been three days now of nothing but one Assert after another as I attempt to learn my way through this. Dont get me wrong. I love this library I find it intuitive but I have been having issues with no way to turn and its almost impossible to debug because we can not see directly the real bounding boxes and have to break and step through while looking at the number. Anyway. just a suggestion I am sure you could come up with something better then what I am thinking but it would be a nice optional feature if it were there.
Hello,
Thanks a lot for your feedback. The idea is that asserts in the code are not there for the user of the library. They are for the developers of ReactPhysics3D in order to know about something should never happen. What is missing, I think, is code to make sure the user of the library cannot do something that might result in an assert somewhere. For instance, we could throw a C++ exception at the creation of an object of the library when this one is not in a valid or correct state (which could result in an assert later in the execution).
Could you please list in this issue what kind of errors did you solve using the asserts in the library ? This way, I can try to improve this and make sure the user dos not have asserts because of wrong state of an object. What kind of errors have you done using the library that you have solved by looking at a raised assert ?