Skip to content

Commit dfdcc91

Browse files
committed
In rare cases SourceErrorFormat is called wihtout position and hides the original error
1 parent 605385c commit dfdcc91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/builder/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ namespace xml2ui {
213213

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

0 commit comments

Comments
 (0)