about
11/29/2022
RustErrorHandling Repo
RustErrorHandling code

RustErrorHandling  Repository

panic, is_ok, match, ?

Quick Status Code functions correctly no known defects Demonstration code yes Documentation yes Test cases No Static library none planned Build requires Rust installed Planned design changes none

Contents:

Demos for Rust error handling: Rust has a rich set of error handling operations built into the language. This repository contains demonstration code for those operations.
  1. RustPanics
    demonstrates when panics occur and how to trap them
  2. ErrorHandlingOps
    demonstrates quering returned results with is_ok, match, let if, ?
  3. ConsoleErrorHandling
    handling errors with stdin and stdout
  4. FileErrorHandling
    handling file open and read/write errors
  5. IndexOutOfBounds
    demonstrates that Rust out of bounds index results in panic
  6. CppUndefinedBehavior
    Illustrates that C++ allows mutation of data with active references and indexing out of bounds, both resulting in undefined behavior. Also shows that C++ provides conventions to avoid undefined behavior.

Build:

This Rust code was built with Cargo from Visual Studio Code terminal and tested on Windows 10.

Status:

No planned changes.
  Next Prev Pages Sections About Keys