Panic! does not stop Iron Server

I thought it panic!stopped everything in Rust, but if I'm panic!in the Iron Route Handler function, it won’t stop the whole server. Instead, it simply displays a panic message.

Is this a "normal" behavior panic!?

I do not post my actual code because I do not think it is useful here, but I can add it if necessary.

+4
source share
2 answers

I thought everything panic!stopped in Rust.

: panic! , . , , .

. -, ...


¹ DK. , . , "". ( ) , "" catch_unwind. ; , . , abort panic!.

+4

panic! Rust :

  • ""
  • ""

, "".

, : ( ) , :

  • panic!:
  • :
  • a catch_unwind: ,

, , , .., .

: , , . , , .

+2

Source: https://habr.com/ru/post/1647995/


All Articles