Skip to content

Commit

Permalink
Merge pull request #28 from HEnquist/next201
Browse files Browse the repository at this point in the history
Clean up old names in documentation, mention need to connect
  • Loading branch information
HEnquist committed Jan 3, 2024
2 parents 2a41384 + c1cb658 commit 46ded4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion camilladsp/camilladsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
_reason_from_reply,
)

VERSION = "2.0.0"
VERSION = "2.0.1"


class CamillaError(ValueError):
Expand Down Expand Up @@ -878,6 +878,10 @@ def __init__(self, host: str, port: int):
"""
Create a new CamillaClient.
The newly created CamillaClient does not
automatically connect to the CamillaDSP process.
Call `connect()` to initiate the connection.
Args:
host (str): Hostname where CamillaDSP runs.
port (int): Port number of the CamillaDSP websocket server.
Expand Down
9 changes: 5 additions & 4 deletions docs/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ The custom exception [CamillaError][camilladsp.camilladsp.CamillaError] is raise

Different exceptions are raised in different situations. Consider the following example:
```python
from camilladsp import CamillaConnection, CamillaError
cdsp = CamillaConnection("127.0.0.1", 1234)
from camilladsp import CamillaClient, CamillaError
cdsp = CamillaClient("127.0.0.1", 1234)

myconfig = # get a config from somewhere
try:
Expand All @@ -19,9 +19,10 @@ except CamillaError as e:
except IOError as e:
print("Websocket is not connected:", e)
```
- `ConnectionRefusedError` means that CamillaDSP isn't responding on the given host and port.
- `ConnectionRefusedError` means that CamillaDSP isn't responding on the given host and port.
- `CamillaError` means that the command was sent and CamillaDSP replied with an error.
- `IOError` can mean a few things, but the most likely is that the websocket connection was lost. This happens if the CamillaDSP process exits or is restarted.
- `IOError` can mean a few things, but the most likely is that the websocket connection was lost.
This happens if the CamillaDSP process exits or is restarted.

## CamillaError
::: camilladsp.camilladsp.CamillaError

0 comments on commit 46ded4e

Please sign in to comment.