sylvainpolletvillard / ObjectModel

Strong Dynamically Typed Object Modeling for JavaScript
http://objectmodel.js.org
MIT License
467 stars 28 forks source link

API to retrieve errors #16

Closed kokujin closed 8 years ago

kokujin commented 8 years ago

At the moment, I place my code in a try/catch block which then emits errors like this:

TypeError expecting id to be String, got undefined

This is okay but to help with the project I'm working on, I will need a better way to extract the exact field that caused the error. Parsing the error string is sub optimal.

Another thing. Does ObjectModel test all attributes before failing? Thanks

sylvainpolletvillard commented 8 years ago

Custom error collectors are coming soon in v1.2, see https://github.com/sylvainpolletvillard/ObjectModel/issues/11

I have finished development and documentation, and currently deals with IE9 compatibility. Check the 1.2 branch for the latest development version. I hope to release 1.2 at the end of the week. Stay tuned :smile: