Hacker News new | ask | show | jobs
by fritolaid 1356 days ago
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?

1 comments

Yes, you can define your own panic handler in Rust.

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