Skip to content

Commit

Permalink
Merge pull request NativeScript#1341 from NativeScript/cankov/fix-pos…
Browse files Browse the repository at this point in the history
…itionless-source-error-format

In rare cases SourceErrorFormat is called wihtout position and hides the original error
  • Loading branch information
PanayotCankov committed Jan 11, 2016
2 parents 0fc54f1 + dfdcc91 commit 3713097
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/builder/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ namespace xml2ui {

export function SourceErrorFormat(uri): ErrorFormatter {
return (e: Error, p: xml.Position) => {
var source = new Source(uri, p.line, p.column);
var source = p ? new Source(uri, p.line, p.column) : new Source(uri, -1, -1);
e = new SourceError(e, source, "Building UI from XML.");
return e;
}
Expand Down

0 comments on commit 3713097

Please sign in to comment.