Added error node to OE tree (#3889)

* Add error node to OE tree

* Add globalerror_red.svg for error node.

* Fixed wrong import resolved automatically

* Resolve PR comments
This commit is contained in:
Yurong He
2019-02-04 19:18:58 -08:00
committed by GitHub
parent 84e0e08aec
commit ef8afab7e8
6 changed files with 38 additions and 17 deletions

View File

@@ -139,6 +139,14 @@ export class MssqlObjectExplorerNodeProvider extends ProviderBase implements sql
let children = await node.getChildren(true);
if (children) {
expandResult.nodes = children.map(c => c.getNodeInfo());
// There is only child returned when failure happens
if (children.length === 1) {
let child = children[0].getNodeInfo();
if (child && child.nodeType === constants.MssqlClusterItems.Error) {
expandResult.errorMessage = child.label;
expandResult.nodes = [];
}
}
}
}
} catch (error) {