Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error-message" customization within "must" statement #507

Open
EvgeniiVR opened this issue Apr 2, 2024 · 1 comment
Open

"error-message" customization within "must" statement #507

EvgeniiVR opened this issue Apr 2, 2024 · 1 comment

Comments

@EvgeniiVR
Copy link
Contributor

EvgeniiVR commented Apr 2, 2024

Hello team,
Does clixon have an option to customize "error-message" that is used within "must" statement directly in yang model?
If there are a lot of entities within a list it becomes difficult to catch one which causes the problem.

Let's say we have a simple list model, e.g.:

{
 container c1 {
   list L1 {
     key name;
     leaf name {
       type string;
     }
     leaf l2 {
       must "Some expression" {
         error-message "Some message";
       }
       type string;
      }
    }
  }
}

So the idea is somehow to customize error-message and enrich it with exact entity name where error occures, like in 'printf' style: error-message ("%s Some message", ../name)

@olofhagsand
Copy link
Member

No there is no such customization.
Sounds like a relatively straightforward extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants