{$I OVC.INC}

{$B-} {Complete Boolean Evaluation}
{$I+} {Input/Output-Checking}
{$P+} {Open Parameters}
{$T-} {Typed @ Operator}
{$W-} {Windows Stack Frame}
{$X+} {Extended Syntax}

{$IFNDEF Win32}
{$G+} {286 Instructions}
{$N+} {Numeric Coprocessor}
{$C MOVEABLE,DEMANDLOAD,DISCARDABLE}
{$ENDIF}

{*********************************************************}
{*                  OVCEXCPT.PAS 2.00                    *}
{*     Copyright (c) TurboPower Software Co 1995-96      *}
{*                 All rights reserved.                  *}
{*********************************************************}

unit OvcExcpt;
  {-Exceptions unit}

interface

uses
  {$IFDEF Win32} Windows, {$ELSE} WinTypes, WinProcs, {$ENDIF}
  Classes, SysUtils,
  OvcData, OvcConst, OvcIntl;

type
  {*** Base Orpheus exeption class ***}
  EOvcException = class(Exception)
  public
    ErrorCode : LongInt;
  end;


  {*** General ***}
  ENoTimersAvailable = class(EOvcException)
  public
    constructor Create;
  end;


  {*** Controller ***}
  EControllerError = class(EOvcException);

  ENoControllerAssigned = class(EControllerError)
  public
    constructor Create;
  end;


  {*** Command Processor ***}
  ECmdProcessorError = class(EOvcException);

  EDuplicateCommand = class(ECmdProcessorError)
  public
    constructor Create;
  end;

  ETableNotFound = class(ECmdProcessorError)
  public
    constructor Create;
  end;


  {*** Entry Fields ***}
  EEntryFieldError = class(EOvcException);

  EInvalidDataType = class(EEntryFieldError)
  public
    constructor Create;
  end;

  EInvalidPictureMask = class(EEntryFieldError)
  public
    constructor Create(Mask : string);
  end;

  EInvalidRangeValue = class(EEntryFieldError)
  public
    constructor Create(DataType : Byte);
  end;

  EInvalidDateForMask = class(EEntryFieldError)
  public
    constructor Create;
  end;


  {*** Editors ***}
  EEditorError = class(EOvcException)
  public
    constructor Create(const Msg : string; Error : LongInt);
  end;

  EInvalidLineOrCol = class(EEditorError)
  public
    constructor Create;
  end;

  EInvalidLineOrPara = class(EEditorError)
  public
    constructor Create;
  end;


  {*** Viewers ***}
  EViewerError = class(EOvcException);

  ERegionTooLarge = class(EViewerError)
  public
    constructor Create;
  end;


  {*** Notebook ***}
  ENotebookError = class(EOvcException);

  EInvalidPageIndex = class(ENotebookError)
  public
    constructor Create;
  end;

  EInvalidTabFont = class(ENotebookError)
  public
    constructor Create;
  end;


  {*** Rotated Label ***}
  ERotatedLabelError = class(EOvcException);

  EInvalidLabelFont = class(ERotatedLabelError)
  public
    constructor Create;
  end;


  {*** Timer Pool ***}
  ETimerPoolError = class(EOvcException);

  EInvalidTriggerHandle = class(ETimerPoolError)
  public
    constructor Create;
  end;


  {*** Virtual Listbox ***}
  EVirtualListboxError = class(EOvcException);

  EOnSelectNotAssigned = class(EVirtualListboxError)
  public
    constructor Create;
  end;

  EOnIsSelectedNotAssigned = class(EVirtualListboxError)
  public
    constructor Create;
  end;


  {*** Sparse Array ***}
  ESparseArrayError = class(EOvcException);

  ESAEAtMaxSize = class(ESparseArrayError);

  ESAEOutOfBounds = class(ESparseArrayError);


  {*** Table controls ***}
  ETableError = class(EOvcException)
  public
    constructor Create(const Msg : string);
    constructor CreateFmt(const Msg : string; const Args : array of const);
    constructor CreateRes(Ident : Word);
    constructor CreateResFmt(Ident : Word; const Args : array of const);
  end;


  {*** Fixed Font ***}
  EFixedFontError = class(EOvcException);

  EInvalidFixedFont = class(EFixedFontError)
  public
    constructor Create;
  end;

  EInvalidFontParam = class(EFixedFontError)
  public
    constructor Create;
  end;


  {*** Alarm ***}
  EAlarmError = class(EOvcException);

  EInvalidAlarmHandle = class(EAlarmError)
  public
    constructor Create;
  end;


implementation
