server/__init__.py
branchstable
changeset 7573 c8f8762c986d
parent 7529 2fdc310be7cd
child 7574 34154f48d255
--- a/server/__init__.py	Wed Jun 29 15:50:26 2011 +0200
+++ b/server/__init__.py	Wed Jun 29 16:02:24 2011 +0200
@@ -36,6 +36,12 @@
 
 from cubicweb import CW_SOFTWARE_ROOT
 
+class ShuttingDown(BaseException):
+    """raised when trying to access some resources while the repository is
+    shutting down. Inherit from BaseException so that `except Exception` won't
+    catch it.
+    """
+
 # server-side debugging #########################################################
 
 # server debugging flags. They may be combined using binary operators.