tv4 icon indicating copy to clipboard operation
tv4 copied to clipboard

Rewrite languages as error reporters?

Open geraintluff opened this issue 10 years ago • 0 comments

Instead of filling out the message from a particular language template when it's found, how about the error just contains a code and a set of fixed/documented parameters?

Then, if a human-readable version is required, that can be done in a separate pass.

I'm partly thinking of this because my schema2js project (code-generation for validation) returns tv4-compatible error codes and parameters, and with a bit of refactoring they could share all the language stuff and formatting.

geraintluff avatar Jul 08 '14 14:07 geraintluff