-- Error.mesa
--    last edited by Lewis on  4-Jan-82 17:55:05
--    last edited by Satterthwaite, December 22, 1982 3:35 pm

DIRECTORY
  BcdDefs USING [FTIndex, MTIndex, NameRecord, VersionStamp],
  SourceBcd USING [ComponentKind, CTreeIndex],
  String USING [SubString],
  HashOps USING [HTIndex];

Error: DEFINITIONS =
  BEGIN

  ErrorClass: TYPE = {error, warning};

  Error: PROC [class: ErrorClass, s: STRING];
  ErrorHti: PROC [class: ErrorClass, s: STRING, hti: HashOps.HTIndex];
  ErrorFile: PROC [class: ErrorClass, s: STRING, fti: BcdDefs.FTIndex];
  ErrorName: PROC [class: ErrorClass, s: STRING, name: BcdDefs.NameRecord];

  WrongSymbolsVersion: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex, 
    requiredVersion, actualVersion: BcdDefs.VersionStamp];

  WrongFileVersion: PROC [
    class: ErrorClass, 
    fti: BcdDefs.FTIndex, 
    requiredVersion, actualVersion: BcdDefs.VersionStamp];

  UnknownComponent: PROC [
    class: ErrorClass, 
    kind: SourceBcd.ComponentKind, 
    mainPartOfCompId: HashOps.HTIndex];

  AmbiguousComponent: PROC [
    class: ErrorClass, 
    kind: SourceBcd.ComponentKind, 
    compNode1, compNode2: SourceBcd.CTreeIndex];

  -- One of the code packs excepted by an implicit component description has 
  -- itself an implicit c.d. including a module of the original c.d. (whew)   
  ImplicitCDIncludesModule: PROC [
    class: ErrorClass, 
    componentId, codePackId: HashOps.HTIndex, 
    module: BcdDefs.MTIndex];

  ModuleInTwoSegments: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex, 
    segId1, segId2: HashOps.HTIndex];

  ModuleAlreadyPacked: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex];

  TableCompModuleNotIncAsUnit: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex];

  NotProcInModule: PROC [
    class: ErrorClass, 
    procName: HashOps.HTIndex, 
    module: BcdDefs.MTIndex];

  ProcPlacedTwice: PROC [
    class: ErrorClass, 
    procId: String.SubString, 
    module: BcdDefs.MTIndex,
    cpId1, cpId2: HashOps.HTIndex];

  ProcNotPlaced: PROC [
    class: ErrorClass, 
    procId: String.SubString, 
    module: BcdDefs.MTIndex];

  NoProcFromModuleInCP: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex, 
    cpId: HashOps.HTIndex];
 
  EmptyCodePack: PROC [
    class: ErrorClass, 
    cpId: HashOps.HTIndex];

  FrameInTwoFramePacks: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex, 
    fpId1, fpId2: HashOps.HTIndex];

  FrameNotPlaced: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex];

  EVNotFirst: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex];
  
  EVInDiscardCodePack: PROC [
    class: ErrorClass, 
    module: BcdDefs.MTIndex];

  SegmentTooLarge: PROC [
    class: ErrorClass, 
    segId: String.SubString];

  END.