Skip to content

Commit 36be05a

Browse files
committed
README.rst: document exceptions raised
1 parent 714963c commit 36be05a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ Binaries for Python Extension Packages <http://www.lfd.uci.edu/~gohlke/pythonlib
7171

7272
.. _Anaconda: https://www.continuum.io/downloads
7373

74+
Error Reporting
75+
---------------
76+
77+
In case of API usage errors the ``soundfile`` module raises the usual `ValueError` or `TypeError`.
78+
79+
For other errors `SoundFileError` is raised (used to be `RuntimeError`).
80+
Particularly, a `LibsndfileError` subclass of this exception is raised on
81+
errors reported by the libsndfile library. In that case the exception object
82+
provides the libsndfile internal error code in the `LibsndfileError.code` attribute and the raw
83+
libsndfile error message in the `LibsndfileError.error_string` attribute.
84+
7485
Read/Write Functions
7586
--------------------
7687

0 commit comments

Comments
 (0)