Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Sep 2, 2024
1 parent 4875cbe commit c70a44f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions client/ayon_core/pipeline/publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ AYON is using `pyblish` for publishing process which is a little bit extented an
## Exceptions
AYON define few specific exceptions that should be used in publish plugins.

### Validation exception
Validation plugins should raise `PublishValidationError` to show to an artist what's wrong and give him actions to fix it. The exception says that error happened in plugin can be fixed by artist himself (with or without action on plugin). Any other errors will stop publishing immediately. Exception `PublishValidationError` raised after validation order has same effect as any other exception.
### Publish error
Exception `PublishError` can be raised on known error. The message is shown to artist.
- **message** Error message.
- **title** Short description of error (2-5 words). Title can be used for grouping of exceptions per plugin.
- **description** Override of 'message' for UI, you can add markdown and html. By default, is filled with 'message'.
- **detail** Additional detail message that is hidden under collapsed component.

Exception `PublishValidationError` 3 arguments:
- **message** Which is not used in UI but for headless publishing.
- **title** Short description of error (2-5 words). Title is used for grouping of exceptions per plugin.
- **description** Detailed description of happened issue where markdown and html can be used.
Arguments `title`, `description` and `detail` are optional. Title is filled with generic message "This is not your fault" if is not passed.

### Validation exception
Validation plugins should raise `PublishValidationError` to show to an artist what's wrong and give him actions to fix it. The exception says that error happened in plugin can be fixed by artist himself (with or without action on plugin). Any other errors will stop publishing immediately. Exception `PublishValidationError` raised after validation order has same effect as any other exception.

### Known errors
When there is a known error that can't be fixed by user (e.g. can't connect to deadline service, etc.) `KnownPublishError` should be raise. The only difference is that it's message is shown in UI to artist otherwise a neutral message without context is shown.
Exception expect same arguments as `PublishError`. Value of `title` is filled with plugin label if is not passed.

## Plugin extension
Publish plugins can be extended by additional logic when inherits from `AYONPyblishPluginMixin` which can be used as mixin (additional inheritance of class).
Expand Down

0 comments on commit c70a44f

Please sign in to comment.