Skip to content

Commit

Permalink
Docs: Add subtitles for registry error messages (#2502)
Browse files Browse the repository at this point in the history
  • Loading branch information
entrywayaudibly authored Oct 21, 2020
1 parent 6e56ed8 commit 4c1bead
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions docs/api/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ sidebar_label: registry()

# registry()


Allows custom registries to be plugged into the task system, which can provide shared tasks or augmented functionality.

**Note:** Only tasks registered with `task()` will be provided to the custom registry. The task functions passed directly to `series()` or `parallel()` will not be provided - if you need to customize the registry behavior, compose tasks with string references.
Expand Down Expand Up @@ -50,14 +49,34 @@ If a `registryInstance` is passed, nothing will be returned. If no arguments are

### Errors

When a constructor (instead of an instance) is passed as `registryInstance`, throws an error with the message, "Custom registries must be instantiated, but it looks like you passed a constructor".
#### Incorrect Parameter

When a constructor (instead of an instance) is passed as `registryInstance`, throws an error with the message:

> Custom registries must be instantiated, but it looks like you passed a constructor.
#### Missing get Method

When a registry without a `get` method is passed as `registryInstance`, throws an error with the message:

> Custom registry must have `get` function.
#### Missing set Method

When a registry without a `set` method is passed as `registryInstance`, throws an error with the message:

> Custom registry must have `set` function.
#### Missing init Method

When a registry without an `init` method is passed as `registryInstance`, throws an error with the message:

When a registry without a `get` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `get` function".
> Custom registry must have `init` function"
When a registry without a `set` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `set` function".
#### Missing tasks Method

When a registry without an `init` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `init` function"
When a registry without a `tasks` method is passed as `registryInstance`, throws an error with the message:

When a registry without a `tasks` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `tasks` function".
> Custom registry must have `tasks` function.
[creating-custom-registries]: ../advanced/creating-custom-registries.md

0 comments on commit 4c1bead

Please sign in to comment.