Rust Errors Backtrace

Veröffentlicht am: 16 Juni 2022
auf dem Kanal: The Dev Method
1,024
26

#rust #errors #panic #shorts

There are two groups of errors: recoverable and unrecoverable. Errors are a part of programming and every language handles it differently.

Recoverable errors are the ones you can catch while the program’s running and have the program decide what to do next depending on the kind of error it is in the current context. For example, maybe you want to read a file but the file cannot be found. Maybe you need to tell the user or the caller of your function that this error occurred because of this reason.

Unrecoverable errors are ones where the program cannot continue run. Like, reaching beyond the bounds of an array.

Rust has no exceptions. Instead, we use the Result type for recoverable errors and panic! macro for unrecoverable errors.

Links

Chapter 9 of the Rust Programming Book: Error Handling
https://doc.rust-lang.org/book/ch09-0...


Auf dieser Seite können Sie das Online-Video Rust Errors Backtrace mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer The Dev Method 16 Juni 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,024 Mal angesehen und es wurde von 26 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!