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

Need to decide how errors should be handled #7

Open
danielytics opened this issue Jun 8, 2015 · 0 comments
Open

Need to decide how errors should be handled #7

danielytics opened this issue Jun 8, 2015 · 0 comments

Comments

@danielytics
Copy link
Member

A number of potential errors may occur that currently aren't handled very well:

  1. invalid data passed to precompile or compile. Need to validate that this isn't the case (as a function precondition?)
  2. invalid node structure during transformations (currently, shouldn't happen as long as hiccup is properly normalised, but currently normalisation does not handle invalid data properly)
  3. transformation arguments should be validated somehow (eg set-attr takes two keywords, most others take only one keyword)
  4. transformations whose selectors are not found in the template are silently ignored
  5. actions which are not found in the action-map are silently ignored

What needs to be done:

  • Need to validate inputs to precompile and compile and throw an exception if not valid.
  • Hiccup normalisation needs to detect malformed data and throw an exception
  • Action map should include a "schema" for the arguments. Compile should throw an exception if the supplied actions do not match the schema.
  • Decide if unused transformations should be silently ignored, output a warning or throw an exception
  • Actions not found in the action-map should either throw an exception or generate a warning (need to decide which)
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

1 participant