Skip to content

wdte: add a way to execute a chain section regardless of an error #170

@DeedleFake

Description

@DeedleFake

As of #168, it's now possible to 'catch' errors in chains using -| as a chain operator. What it's not possible to do, however, is to cause a section to be used regardless of whether or not an error happened. A 'finally', essentially. This would be useful for, for example, opening a file, writing to it, and then closing whether or not there was an error.

Two likely possibilities:

  • Cause ignored sections to do this. This would be useful for the above example, but might not be useful in some other cases.
  • Add another chain operator, such as -|>, which would do this. I'm not particularly a fan of this one, but it's definitely possible.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions