]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[65-libyang-adaptor] Added exception MissingKey
authorFrancis Dupont <fdupont@isc.org>
Mon, 3 Sep 2018 15:42:21 +0000 (17:42 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 3 Sep 2018 16:01:39 +0000 (18:01 +0200)
src/lib/yang/adaptor.h

index d8c05b2fd8fa4207cafdff7d347313bbe51db8a8..f5cb6d5383e4aad98ba58dca6427e3f3547cea53 100644 (file)
@@ -7,11 +7,20 @@
 #ifndef ISC_ADAPTOR_H
 #define ISC_ADAPTOR_H 1
 
+#include <exceptions/exceptions.h>
 #include <cc/data.h>
 
 namespace isc {
 namespace yang {
 
+/// @brief Missing key error.
+class MissingKey : public isc::Exception {
+public:
+    MissingKey(const char* file, size_t line, const char* what) :
+        isc::Exception(file, line, what)
+    {}
+};
+
 /// @brief JSON adaptor between canonical Kea and Yang models.
 ///
 /// An adaptor slightly modifies a JSON configuration between canonical Kea