mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 23:13:00 +00:00
Merge pull request #3765 from twalcari/patch-2
Improve documentation about spawner exception handling
This commit is contained in:
@@ -108,6 +108,16 @@ class MySpawner(Spawner):
|
|||||||
return url
|
return url
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Exception handling
|
||||||
|
|
||||||
|
When `Spawner.start` raises an Exception, a message can be passed on to the user via the exception via a `.jupyterhub_html_message` or `.jupyterhub_message` attribute.
|
||||||
|
|
||||||
|
When the Exception has a `.jupyterhub_html_message` attribute, it will be rendered as HTML to the user.
|
||||||
|
|
||||||
|
Alternatively `.jupyterhub_message` is rendered as unformatted text.
|
||||||
|
|
||||||
|
If both attributes are not present, the Exception will be shown to the user as unformatted text.
|
||||||
|
|
||||||
### Spawner.poll
|
### Spawner.poll
|
||||||
|
|
||||||
`Spawner.poll` should check if the spawner is still running.
|
`Spawner.poll` should check if the spawner is still running.
|
||||||
|
Reference in New Issue
Block a user