]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5123] Added DhcpConfigError convention
authorFrancis Dupont <fdupont@isc.org>
Fri, 27 Jan 2017 08:34:58 +0000 (09:34 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 27 Jan 2017 08:34:58 +0000 (09:34 +0100)
src/lib/cc/dhcp_config_error.h

index 6b205fbcab272abe51c7067ea061d3bbf06fdb40..88c543430472777ca1df1fbc6f5ce31f3c3d9b31 100644 (file)
@@ -14,6 +14,18 @@ namespace dhcp {
 
 /// An exception that is thrown if an error occurs while configuring
 /// DHCP server.
+/// By convention when this exception is thrown there is a position
+/// between parentheses so the code style should be like this:
+///
+/// try {
+///     ...
+/// } catch (const DhcpConfigError&) {
+///     throw;
+/// } catch (const std::exception& ex) {
+///    isc_throw(DhcpConfigError, "message" << ex.what()
+///              << " (" << getPosition(what) << ")");
+/// }
+
 class DhcpConfigError : public isc::Exception {
 public: