-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
A number of potential errors may occur that currently aren't handled very well:
- invalid data passed to precompile or compile. Need to validate that this isn't the case (as a function precondition?)
- 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)
- transformation arguments should be validated somehow (eg
set-attrtakes two keywords, most others take only one keyword) - transformations whose selectors are not found in the template are silently ignored
- 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)