YOUSEFUL / DELPHI / COMPONENTS

EAtlasDataError

The exception raised for invalid table data, schema changes, CSV text, pivot input and value edits.

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

Description

Raised by TAtlasTable (invalid values, indices, schema changes and CSV), AtlasParseCSV, TAtlasGrid.CommitEdit and the grid actions that commit, TAtlasValueEdit.NormalizedValue and TAtlasPivot.Summarize. The operation that raises it changes nothing. The message says what was wrong, for example Invalid finite number: ten or Row must contain exactly one value per column.

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

Examples

Reject a row without losing the table

Prints Rejected: Invalid finite number: ten, Rejected: Row must contain exactly one value per column and TRUE 1.

pascal
uses System.SysUtils, Atlas.Data;

function TryAddRow(Table: TAtlasTable; const Values: array of string): Boolean;
begin
  try
    Table.AddRow(Values);
    Result := True;
  except
    on E: EAtlasDataError do
    begin
      Writeln('Rejected: ', E.Message); // the table is unchanged
      Result := False;
    end;
  end;
end;

TAtlasTable · TAtlasGrid · TAtlasValueEdit

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