YOUSEFUL / DELPHI / COMPONENTS

EAtlasGraphError

Raised by TAtlasGraph for unknown nodes or edges, invalid bounds, self or duplicate edges, cycles and rejected JSON.

Class Unit Atlas.Graph · Inherits Exception · Product Atlas VCL

Description

Raised by TAtlasGraph: Unknown graph node <ID>, Node bounds are outside the supported range, Self edges are not supported, Duplicate edge, Unknown edge, Graph contains a cycle (from TopologicalOrder and LayoutHierarchy), Node ID space exhausted, and the LoadJSON messages for malformed text. The graph is unchanged after each of them. A TAtlasDiagram in connect mode can raise Duplicate edge from its mouse handler. TAtlasTaskPlan raises it as well.

This type has no members of its own beyond those listed in its description.

Examples

Connect only when allowed

Returns False for an unknown node, a self edge or a duplicate instead of raising.

pascal
uses System.SysUtils, Atlas.Graph;

function TryConnect(Graph: TAtlasGraph; SourceID, TargetID: Integer): Boolean;
begin
  try
    Graph.AddEdge(SourceID, TargetID);
    Result := True;
  except
    on EAtlasGraphError do Result := False;
  end;
end;

TAtlasGraph

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer