Skip to content

Error handling in functions #109

@danyill

Description

@danyill

scl-lib has a beautiful API in terms of returning edits and I've been enjoying it 👏

When creating the Stencil plugin recently I wanted to be very confident that all subscription and supervision changes had been successful.

I think some of our existing code has checks and nullish coalescing and other features which could result in a silent failure.

Should we return an "error code" or exit status perhaps a la Linux/Unix where we can positively affirm that everything functioned correctly. Or should our functions be written such that we can add these checks (e.g. for subscriptions that each ExtRef results in an appropriate item in an Edit array? This sounds a bit dubious).

Perhaps we need to return an edit array with an optional error result or throw an error from within scl-lib.
I think this needs some architecture and likely assistance from @ca-d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions