Skip to content

Try-catch error handling #151

@tomhrr

Description

@tomhrr

Currently, there are internal compilation/runtime errors, produced by calling print_error and then returning 0, as well as shell errors, produced by calling the error form. In both cases, if an error occurs, the error message is immediately printed to standard error, and processing is aborted. Add a try form to the shell that, when added before another form, causes two other values to be added onto the stack before any values added by the other form itself: a boolean indicating whether the form was executed without error, and a string containing any error message that was produced if the form did encounter an error during execution.

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