shill: Catch C++ exceptions by reference instead of value.
BUG=chromium-os:30583
TEST=Build and run unit tests.
Change-Id: Icaa836893724a8cf03547da2a575b458b0fd6792
Reviewed-on: https://gerrit.chromium.org/gerrit/21920
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
diff --git a/HACKING b/HACKING
index a4abed6..aeaa23d 100644
--- a/HACKING
+++ b/HACKING
@@ -103,6 +103,11 @@
RATIONALE: The naming convention makes the relationship between the signal
handler and the task function obvious, at-a-glance.
+- C++ exceptions are not allowed in the code. An exception to this rule is
+ that try-catch blocks may be used in various D-Bus proxy classes to handle
+ DBus::Error exceptions thrown by the D-Bus C++ code. C++ exceptions should
+ be caught by const reference in general.
+
- When adding verbose log messages for debug purposes, use the SLOG marco and
its variants (see scope_logger.h for details).