fortpy icon indicating copy to clipboard operation
fortpy copied to clipboard

Error Handling for Parsers

Open rosenbrockc opened this issue 10 years ago • 0 comments

Although there is limited error handling for the XML parsers and the executable dependency parsers, there is generally no error handling for the parsing. If it encounters something new that hasn't come up in one of the test cases so far, it just croaks. Generally there are good tests for handling outliers, but every now and then I find a code fine that breaks the parsers, and they don't handle it gracefully. Up until now I have just edited the code file slightly to make it compatible.

We need some high level (at first) error handling for the parsing so that it exits gracefully. The best thing would be some lower-level handling that gives suggestions on how to update the code file. Most of the time it isn't a problem with the code, but with the comments. For example, using !! for emphasis when it is reserved for docstrings; or commenting out blocks of code in such a way that the parsers get tricked (though I have only ever seen that once).

rosenbrockc avatar Jun 17 '14 16:06 rosenbrockc