Login
Remember
Register
Ask a Question
What are the Error Handling procedures in Rust?
0
votes
asked
Dec 28, 2023
in
Rust
by
Robin
What are the Error Handling procedures in Rust?
errorhandlingprocedures
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Dec 28, 2023
by
Robin
Rust Error Handling is categorized into three parts:
Recoverable Error with Results : If an error occurs, the program doesn’t stop completely. Instead, it can easily be interpreted or responded.
Unrecoverable Errors with Panic : If something wrong goes with the code, Rust’s panic macro comes into action, shows the error message, clean the error and then quit.
Panic or Not to Panic : When you are dicey about calling panic or not, write the code that panics and the process will continue as 2nd.
...