How does one handle an incorrect resource file?

Posted by AedonEtLIRA on Programmers See other posts from Programmers or by AedonEtLIRA
Published on 2012-10-26T21:51:19Z Indexed on 2012/10/26 23:16 UTC
Read the original article Hit count: 345

I'm starting the parser that will handle one of the key features of my app and realizing exactly who easy it would be for me to screw up a resource file that is provided to the application. For example, a simple resource that I provide to my app is a JSON file that contains an entity layout (name, fascia, location etc...). It would be easy for me to leave out the name of the entity or misspell the JSON key.

Obviously catastrophic failures during parsing are to be handled in a try/catch, but how would subtle failures (such as a dyslexic spelling of name) be handled?

© Programmers or respective owner

Related posts about language-agnostic

Related posts about error-handling