Skip to content

feature: Handling user errors in Mini Micro #44

@BibleClinger

Description

@BibleClinger

Mini Micro currently prints all user errors to the first TextDisplay. This is cumbersome to retrieve, since we must read it back from the TextDisplay. This is unintuitive that errors would have to be retrieved this way, and perhaps even a bit backwards that we're reading it from a Display in the first place (which is like reading VRAM in order to troubleshoot your program).

Consider a program that is acting as an OS for Mini Micro. If this program in turn runs a user program that crashes, the entire OS shuts down and its state must be recovered by the OS shell. This means the error that occurred that caused the crash must be retrieved by this OS recovery shell.

A programmatic way of checking for and retrieving errors outside of using TextDisplay would be beneficial. The follow features are requested:

  1. The option of suppressing the printing of any errors to a TextDisplay.
  2. An intrinsic that allows us to retrieve the last error. (ie. lastError).

The format of an error could be a map containing the following:

  1. The type/classification of error
  2. The error message/details
  3. A timestamp of some sort that indicates when the error occurred

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions