X-Git-Url: https://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=doc%2Fsource%2Fuse.rst;fp=doc%2Fsource%2Fuse.rst;h=e8d6d536cd54130ae9784eda5f6da581747238e0;hp=702968425fa802b82993f0b4f0fe1d28a2f2bade;hb=31cd41780977d5246559a7dead3eea77520f9deb;hpb=c7b2fbbb9689a180f220322b21e2b0bef798eb68 diff --git a/doc/source/use.rst b/doc/source/use.rst index 7029684..e8d6d53 100644 --- a/doc/source/use.rst +++ b/doc/source/use.rst @@ -218,7 +218,7 @@ Fetching album covers is possible with albumart, here is an example: >>> print('something went wrong', file=sys.stderr) >>> cli.disconnect() -A `CommandError` is raised if the album does not expose a cover. +A :py:obj:`musicpd.CommandError` is raised if the album does not expose a cover. You can also use `readpicture` command to fetch embedded picture: @@ -314,6 +314,15 @@ could also be that MPD took too much time to answer, but MPD taking more than a couple of seconds for these commands should never occur). +Exceptions +---------- + +The :py:obj:`musicpd.MPDClient.connect` method raises +:py:obj:`musicpd.ConnectionError` only but then, calling other MPD commands, +the module can raise :py:obj:`musicpd.MPDError` or an :py:obj:`OSError` depending on the error and where it occurs. + +Using musicpd module both :py:obj:`musicpd.MPDError` and :py:obj:`OSError` exceptions families are expected. + .. _MPD protocol documentation: http://www.musicpd.org/doc/protocol/ .. _snake case: https://en.wikipedia.org/wiki/Snake_case .. vim: spell spelllang=en