What happens when an error occurs that is being handled by the question mark (?) operator?

Question:What happens when an error occurs that is being handled by the question mark (?) operator?

1.The error is reported and execution continues.

2.An exception is raised. The effect(s) of the exception are defined by the error! macro

3.The program panics immediately.

4.Rust attempts to convert the error to the local function's error type and return it as Result::Err. If that fails, the program panics.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!