Titanium JIRA Archive
Alloy (ALOY)

[ALOY-216] Improve parser error output

GitHub Issuen/a
TypeStory
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2012-09-14T09:57:23.000+0000
Affected Version/sn/a
Fix Version/s2012 Sprint 19, Release 3.0.0
ComponentsXML
Labelsn/a
ReporterTony Lukasavage
AssigneeUnknown
Created2012-08-28T08:08:46.000+0000
Updated2018-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.

Comments

  1. Tony Lukasavage 2012-08-30

    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.

JSON Source