From: Francis Dupont Date: Fri, 27 Jan 2017 08:34:58 +0000 (+0100) Subject: [5123] Added DhcpConfigError convention X-Git-Tag: trac5126_base~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e922a7af0a5e355dafa80202d90871dc30b9e80;p=thirdparty%2Fkea.git [5123] Added DhcpConfigError convention --- diff --git a/src/lib/cc/dhcp_config_error.h b/src/lib/cc/dhcp_config_error.h index 6b205fbcab..88c5434304 100644 --- a/src/lib/cc/dhcp_config_error.h +++ b/src/lib/cc/dhcp_config_error.h @@ -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: