Since we're making an effort to fix string based exceptions and pointing
out one preferred way to raise exceptions, let's update the CODING_STYLE
file to reflect those actions. This is my suggestion on updating the
text on that file.

Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1160 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/CODING_STYLE b/CODING_STYLE
index b5d3d36..b4e1832 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -72,6 +72,21 @@
 as we all know), and do one thing and do that well.
 
 
+Exceptions
+
+When raising exceptions, the preferred syntax for it is:
+
+raise FooException('Exception Message')
+
+Please don't raise string exceptions, as they're deprecated and will be removed
+from future versions of python. If you're in doubt about what type of exception
+you will raise, please look at http://docs.python.org/lib/module-exceptions.html
+and client/common_lib/error.py, the former is a list of python built in
+exceptions and the later is a list of autotest/autoserv internal exceptions. Of
+course, if you really need to, you can extend the exception definitions on
+client/common_lib/error.py.
+
+
 Submitting patches
 
 Generate universal diffs. Email them to autotest@test.kernel.org.