[ALOY-216] Improve parser error output
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2012-09-14T09:57:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2012 Sprint 19, Release 3.0.0 |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2012-08-28T08:08:46.000+0000 |
Updated | 2018-03-07T22:26:09.000+0000 |
Description
Right now parser output is vague. It only lets you know the name of the element that failed and the rule that it broke. You can kind of determine what file caused it by other non-related log output, but it would be better to improve it.
To do so, we should pass some additional information into the parser via its
state
variable. We could pass in things like view name, view file path, potentially its position in the XML/file, etc...
This will greatly improve the debugging experience. The change itself will not be huge, but it will require a great deal of testing to ensure that we get good output.
Going to pursue the idea of replacing our current custom error reporting with that of nodejs's built in [Error object](http://docs.nodejitsu.com/articles/errors/what-is-the-error-object). Gives us an extendable error object along with node's current call stack.