[svnbook commit] r2782 - trunk/src/en/book
cmpilato
noreply at red-bean.com
Fri Apr 13 00:07:39 CDT 2007
Author: cmpilato
Date: Fri Apr 13 00:07:37 2007
New Revision: 2782
Log:
Tweak the status-printing sample code to demonstrate exception handling.
Modified:
trunk/src/en/book/ch08-embedding-svn.xml
Modified: trunk/src/en/book/ch08-embedding-svn.xml
==============================================================================
--- trunk/src/en/book/ch08-embedding-svn.xml (original)
+++ trunk/src/en/book/ch08-embedding-svn.xml Fri Apr 13 00:07:37 2007
@@ -1225,7 +1225,11 @@
wc_path = svn.core.svn_path_canonicalize(args[0])
# Do the real work.
- do_status(wc_path, verbose)
+ try:
+ do_status(wc_path, verbose)
+ except svn.core.SubversionException, e:
+ sys.stderr.write("Error (%d): %s\n" % (e[1], e[0]))
+ sys.exit(1)
</programlisting>
</example>
More information about the svnbook-dev
mailing list