This is a theoretical question to understand better how exceptions work.
What do I need to check in order to make sure my class is safe to throw? What actually happens when I throw an exception from the stack point of view?
For example, if I create an object in the stack, it should be destroyed when I go out of scope, but what happens when I throw that object? Is it safe to do that or do I have to create the object on the heap?
Thanks a lot!