mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
In rare cases SourceErrorFormat is called wihtout position and hides the original error
This commit is contained in:
@ -213,7 +213,7 @@ namespace xml2ui {
|
|||||||
|
|
||||||
export function SourceErrorFormat(uri): ErrorFormatter {
|
export function SourceErrorFormat(uri): ErrorFormatter {
|
||||||
return (e: Error, p: xml.Position) => {
|
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.");
|
e = new SourceError(e, source, "Building UI from XML.");
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user