[tor-commits] [stem/master] Including exceptions in api docs

atagar at torproject.org atagar at torproject.org
Tue Nov 6 16:58:47 UTC 2012


commit 142450fc68d8df967bc99b632154f43d4b2e3451
Author: Damian Johnson <atagar at torproject.org>
Date:   Tue Nov 6 08:56:44 2012 -0800

    Including exceptions in api docs
    
    Moving the exceptions to stem/__init__.py meant that they were no longer
    covered my any of our automodule declarations. Adding a special 'Exceptions'
    section to the controller's api page.
---
 docs/api/control.rst |    5 +++++
 stem/__init__.py     |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/docs/api/control.rst b/docs/api/control.rst
index 45a3439..0a17d9e 100644
--- a/docs/api/control.rst
+++ b/docs/api/control.rst
@@ -3,3 +3,8 @@ Controller
 
 .. automodule:: stem.control
 
+Exceptions
+----------
+
+.. automodule:: stem
+
diff --git a/stem/__init__.py b/stem/__init__.py
index 4146dff..dd0061f 100644
--- a/stem/__init__.py
+++ b/stem/__init__.py
@@ -32,6 +32,14 @@ __all__ = [
   "process",
   "socket",
   "version",
+  "ControllerError",
+  "ProtocolError",
+  "OperationFailed",
+  "UnsatisfiableRequest",
+  "InvalidRequest",
+  "InvalidArguments",
+  "SocketError",
+  "SocketClosed",
 ]
 
 class ControllerError(Exception):



More information about the tor-commits mailing list