From b8d3788bf00de69da4a57228c8051788e6fc04e8 Mon Sep 17 00:00:00 2001 From: Joe Heck Date: Wed, 3 Apr 2013 09:44:20 -0700 Subject: [PATCH] adding notes about dealing with exceptions in the client Change-Id: I661b10414e0281bc695236bb32f985b0ef5b7600 --- HACKING | 6 ++++++ doc/source/using-api.rst | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/HACKING b/HACKING index 8f990864c..bac532fe3 100644 --- a/HACKING +++ b/HACKING @@ -75,3 +75,9 @@ Docstrings :returns: description of the return value """ + +Exceptions +---------- + +When dealing with exceptions from underlying libraries, translate those +exceptions to an instance or subclass of ClientException. diff --git a/doc/source/using-api.rst b/doc/source/using-api.rst index b5d630c12..fb1aa3a23 100644 --- a/doc/source/using-api.rst +++ b/doc/source/using-api.rst @@ -29,6 +29,10 @@ You create a valid ``keystoneclient.v2_0.client.Client`` object by passing authentication data to the constructor. Authentication and examples of common tasks are provided below. +You can generally expect that when the client needs to propogate an exception +it will raise an instance of subclass of +``keystoneclient.exceptions.ClientException`` + Authenticating ==============