ErrorCodes: {
    DUPLICATE_NET_NAME: { code: string; message: string };
    DUPLICATE_PART: { code: string; message: string };
    DUPLICATE_PIN: { code: string; message: string };
    EMPTY_NET_NAME: { code: string; message: string };
    FILE_NOT_FOUND: { code: string; message: string };
    FILE_READ_ERROR: { code: string; message: string };
    FOOTPRINT_NAME_TOO_LONG: { code: string; message: string };
    INVALID_FILE_HEADER: { code: string; message: string };
    INVALID_NET_FORMAT: { code: string; message: string };
    INVALID_NET_NAME: { code: string; message: string };
    INVALID_PART_FORMAT: { code: string; message: string };
    INVALID_PART_REFDES: { code: string; message: string };
    INVALID_PIN_FORMAT: { code: string; message: string };
    INVALID_SECTION_HEADER: { code: string; message: string };
    MISSING_NET_SECTION: { code: string; message: string };
    MISSING_PART_SECTION: { code: string; message: string };
    MISSING_TOKEN: { code: string; message: string };
    NET_NAME_TOO_LONG: { code: string; message: string };
    PART_REFDES_TOO_LONG: { code: string; message: string };
    PIN_NAME_TOO_LONG: { code: string; message: string };
    PIN_REFDES_TOO_LONG: { code: string; message: string };
    UNEXPECTED_EOF: { code: string; message: string };
    UNEXPECTED_SECTION: { code: string; message: string };
    UNEXPECTED_TOKEN: { code: string; message: string };
} = ...

Error codes and messages for the PADS parser.

Type declaration

  • DUPLICATE_NET_NAME: { code: string; message: string }
  • DUPLICATE_PART: { code: string; message: string }
  • DUPLICATE_PIN: { code: string; message: string }
  • EMPTY_NET_NAME: { code: string; message: string }
  • FILE_NOT_FOUND: { code: string; message: string }

    E001: File not found

    parse('nonexistent.pads') // Throws FILE_NOT_FOUND
    
  • FILE_READ_ERROR: { code: string; message: string }

    E002: Error reading file Occurs when file exists but cannot be read (permissions, encoding)

    parse('readonly.pads') // Throws FILE_READ_ERROR
    
  • FOOTPRINT_NAME_TOO_LONG: { code: string; message: string }
  • INVALID_FILE_HEADER: { code: string; message: string }

    E003: Invalid file header

    PADS files must start with either 'PADS-PCB' or 'PADS2000'

    Valid headers:

    *PADS-PCB*
    *PADS2000*
  • INVALID_NET_FORMAT: { code: string; message: string }

    E301: Invalid net format

    Nets must be defined as: SIGNAL NetName Followed by pin connections

    Valid format:

    *SIGNAL* VCC
    U1.1 R1.1 C1.1
  • INVALID_NET_NAME: { code: string; message: string }
  • INVALID_PART_FORMAT: { code: string; message: string }

    E201: Invalid part format

    Parts must be defined as: RefDes Footprint [Value]

    Valid formats:

    U1 DIP14
    R1 0805 10k
    C1 0603 100n@50V
  • INVALID_PART_REFDES: { code: string; message: string }
  • INVALID_PIN_FORMAT: { code: string; message: string }
  • INVALID_SECTION_HEADER: { code: string; message: string }
  • MISSING_NET_SECTION: { code: string; message: string }
  • MISSING_PART_SECTION: { code: string; message: string }

    E101: Missing PART section

    Every PADS file must contain a PART section defining components

    Required section:

    *PART*
    U1 DIP14
    R1 0805
  • MISSING_TOKEN: { code: string; message: string }
  • NET_NAME_TOO_LONG: { code: string; message: string }
  • PART_REFDES_TOO_LONG: { code: string; message: string }
  • PIN_NAME_TOO_LONG: { code: string; message: string }
  • PIN_REFDES_TOO_LONG: { code: string; message: string }
  • UNEXPECTED_EOF: { code: string; message: string }
  • UNEXPECTED_SECTION: { code: string; message: string }
  • UNEXPECTED_TOKEN: { code: string; message: string }

The error codes are organized into categories:

  • E0xx: General File Errors
  • E1xx: Section Errors
  • E2xx: Part Errors
  • E3xx: Net Errors
  • E4xx: Pin Errors
  • E5xx: Other Errors