Page MenuHomePhabricator

Allow users to create instances of errors in composition
Closed, ResolvedPublic

Description

It seems I cannot create instances of errors.

(Which kinda makes sense, since error types are not types).

There are a few possible approaches to that:
a) bespoke implementation to make this happen
b) create a function that takes an error type and returns a type, which then is used

On first thought, I prefer b over a.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
StalledNone
Resolvedcmassaro
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedNone
ResolvedNone
Resolvedcmassaro
ResolvedBUG REPORTcmassaro
Resolvedcmassaro
ResolvedNone
Resolvedgengh
Resolvedgengh
DeclinedLindsaykwardell
ResolvedLindsaykwardell
Resolvedcmassaro
Resolvedcmassaro
ResolvedNone
ResolvedNone
Resolvedcmassaro
ResolvedNone
InvalidNone
Invalidgengh
ResolvedDVrandecic
ResolvedDVrandecic
ResolvedDVrandecic
ResolvedSimoneThisDot
ResolvedSimoneThisDot
ResolvedJKieserman
ResolvedNone
ResolvedNone
ResolvedJdforrester-WMF
ResolvedNone
ResolvedNone
DeclinedNone
ResolvedSimoneThisDot
ResolvedSimoneThisDot
Resolvedcmassaro
Resolvedcmassaro
ResolvedSimoneThisDot
ResolvedSimoneThisDot
Resolvedcmassaro
Resolvedcmassaro
ResolvedBUG REPORTJdforrester-WMF
ResolvedSimoneThisDot
Resolvedgengh
Resolvedgengh
Resolvedcmassaro
Resolvedcmassaro
ResolvedJdforrester-WMF
ResolvedDVrandecic
ResolvedDVrandecic
ResolvedJdforrester-WMF
Resolvedcmassaro
ResolvedSimoneThisDot
ResolvedJdforrester-WMF
ResolvedDVrandecic
ResolvedNone
ResolvedNone
Resolvedcmassaro
ResolvedDVrandecic
ResolvedLindsaykwardell
Resolvedarthurlorenzi
ResolvedNone
InvalidNone
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
ResolvedJdforrester-WMF
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
ResolvedNone
ResolvedSimoneThisDot
ResolvedJdforrester-WMF
Resolvedcmassaro
Resolvedcmassaro
Resolvedcmassaro
ResolvedAdesojiThisDot
Resolvedgengh
Resolvedgengh
Resolvedgengh
Resolvedcmassaro
Resolvedcmassaro
Resolvedgengh

Event Timeline

Jdforrester-WMF renamed this task from Need to create instances of errors in composition to Allow users to create instances of errors in composition.Aug 25 2021, 4:42 PM
DVrandecic triaged this task as Medium priority.Oct 6 2021, 4:39 PM

Is this ready to do? I think this needs definition of what changes and what the DoD is.

In discussion with Cory, I think we should make this as a Z820/Raise metadata function that takes a Z6 and a Z1, and if the Z6 is 'error' injects the Z1 (a Z5) into the Z22K2 return value.

Change 757096 had a related patch set uploaded (by Cory Massaro; author: Cory Massaro):

[mediawiki/services/function-orchestrator@master] Add builtin throw function to allow user definition of errors in compositions.

https://gerrit.wikimedia.org/r/757096

Change 757096 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Add builtin throw function to allow user definition of errors in compositions.

https://gerrit.wikimedia.org/r/757096

Jdforrester-WMF changed the task status from Open to In Progress.Jan 26 2022, 5:19 PM
Jdforrester-WMF assigned this task to cmassaro.
Jdforrester-WMF updated the task description. (Show Details)

Change 761041 had a related patch set uploaded (by Jforrester; author: Cory Massaro):

[mediawiki/services/function-schemata@master] definitions: Add Z820/Trigger Metadata and built-in implementation

https://gerrit.wikimedia.org/r/761041

Change 761041 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] definitions: Add Z820/Trigger Metadata and built-in implementation

https://gerrit.wikimedia.org/r/761041

Change 761474 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (0d127c2)

https://gerrit.wikimedia.org/r/761474

Change 761475 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (0d127c2)

https://gerrit.wikimedia.org/r/761475

Change 761476 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (0d127c2)

https://gerrit.wikimedia.org/r/761476

Change 761475 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (0d127c2)

https://gerrit.wikimedia.org/r/761475

Change 761474 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (0d127c2)

https://gerrit.wikimedia.org/r/761474

Change 761476 merged by jenkins-bot:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (0d127c2)

https://gerrit.wikimedia.org/r/761476