zlacker

[parent] [thread] 1 comments
1. fritol+(OP)[view] [source] 2022-10-02 15:27:59
Unless it was holding a welding gun and stopped on one spot with the welding flame turned on instead of gracefully turning off the flame and backing away.

Never used Rust before but is there a way to supply some default code to run in such a situation instead of just not carrying out the bad operation?

replies(1): >>shephe+v2
2. shephe+v2[view] [source] 2022-10-02 15:41:48
>>fritol+(OP)
Yes, you can define your own panic handler in Rust.

https://doc.rust-lang.org/nomicon/panic-handler.html

[go to top]