3 ms·
> As I mentioned, panics can be handled but not recovered. You can use the panic handler to do these things just fine. Just not recover. What does this differe
by littlestymaar 1y ago
> As I mentioned, panics can be handled but not recovered. You can use the panic handler to do these things just fine. Just not recover.
What does this difference mean? If you can run arbitrary function in your panic handler, what prevents someone from continuing the program?
- Zambyte 1y agoThe stack is fully unwound before running the panic function, including the main stack frame. This will run all deferred deallocation statements, and pretty much leave you with nothing to do but exit. You could try to launch the program again automatically, but there is little reason to do that most likely. The user will still see the application terminate and launch again.