Merge "Improve error message for enum values"
diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index 75d8553..82d0b1d 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -462,6 +462,11 @@
 
         if (!schema.leafEnumHasValue(location, {module, leaf.m_name}, ast.m_value)) {
             _pass(context) = false;
+
+            parserContext.m_errorMsg = "Expected an enum here. Allowed values:";
+            for (const auto& it : schema.enumValues(location, {module, leaf.m_name})) {
+                parserContext.m_errorMsg += " " + it;
+            }
         }
     }
 };