Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve internal reporting of errors in vm/vmgen #268

Merged
merged 1 commit into from
Apr 8, 2022

Commits on Apr 8, 2022

  1. Improve reporting of errors in vm/vmgen

    Reporting of guest code related errors was done in an inconsistent
    manner via either `stackTrace` or `globalReport`, where `stackTrace` used
    `localReport` and an injected `return` statement to terminate the
    execution loop. `stackTrace` was sometimes used in nested functions,
    thus not terminating execution at all.
    
    ## Changes
    Both the execution engine and `vmgen` now use exceptions for error
    propagation internally, translating them into a result value at their
    respective interface edges. In case of an error, the result value stores the
    error report. Otherwise, it stores the actual result.
    
    In addition, some usages of `globalReport` are also replaced with the
     new error propagation mechanism.
    
    Depending on whether or not a VM invocation is expected to return
    something, errors reported from VM execution and/or `vmgen` are either
     turned into a `nkError` node or handled directly via `handleReport`
    zerbina committed Apr 8, 2022
    Configuration menu
    Copy the full SHA
    8850e11 View commit details
    Browse the repository at this point in the history