Skip to content

Handling errors #41

Description

@draggett

Chunk operations such as get and put update the module's buffer status. The status is one of pending, okay, nomatch, failed, or forbidden. An example is where @do get is used to request a matching chunk, and no such match is found. In this case, the buffer is set to undefined, and the status to nomatch.

  • Should the buffer be cleared on such errors?

On the one hand, clearing the buffer makes sense given the failure to complete the operation. On the other hand, perhaps rules could be designed to use the previous value of the buffer before the operation was initiated.

Note that the JavaScript implementation of chunks currently doesn't implement failed or forbidden, but these would make sense for access controlled chunk graphs and for application specific actions. Rule conditions can (in principle) test the status with @status.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions