Article Directory
foreword
The catalog of this series of tutorials can be viewed here: Rust Tutorial Catalog
This chapter is about error handling in Rust, which is very different from many other languages.
And in Rust code, you will also encounter it very frequently, so in order to further learn other features in Rust, it is necessary to learn about error handling in Rust
1. What's the difference?
As mentioned earlier, the error handling method of Rust language is very different from that of many other languages.
For now, there are two mainstream error forms: returning error codes and throwing exceptions
Among them, the return error code &#x used in the c language