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

Improve validation and error handling #64

Open
gilesknap opened this issue May 9, 2023 · 2 comments
Open

Improve validation and error handling #64

gilesknap opened this issue May 9, 2023 · 2 comments
Assignees

Comments

@gilesknap
Copy link
Member

Some improvements suggested in conversation with @coretl

  • in getattrs make a nice error when a non-existent attribute is requested (I am type X with attrs ... but you have asked for Attr Y)
  • also remove need to say object.name instead render object as its id
  • Provide a validation capability for defs e.g.
defs:
  - name: Psc
    args:
      - name: carrier
        type: object
        description: IPAC carrier name

      - name: interrupt_vector
        type: object
        description: Interrupt Vector reserved with epics.InterruptVectorVME, count=3

    validate:
      - assert: interrupt_vector.count == 3
        message: Interrupt_vector must be reserved with epics.InterruptVectorVME, count=3
@gilesknap gilesknap self-assigned this Jun 12, 2023
@gilesknap
Copy link
Member Author

gilesknap commented Sep 4, 2023

Do this after J20

@gilesknap
Copy link
Member Author

The first two bullets are now covered in 3.0.0b5

Leaving this open as the suggestion of a validate is still useful.

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

No branches or pull requests

1 participant