HED JavaScript Library
    Preparing search index...

    Class IssueError

    Hierarchy

    • Error
      • IssueError
    Index
    issue: Issue

    The associated HED issue.

    message: string
    name: string
    stack?: string
    • Generate and re-throw an error according to generateFn.

      This method will pass error to generateFn, unless it is not an Error object (in which case, it will generate an internal error via IssueError.generateAndThrowInternalError). generateFn` is expected to return an internal issue code and parameter object, which will be passed to IssueError.generateAndThrow. Failure to provide an internal issue code will also result in an internal error.

      Parameters

      • error: any

        This is expected to be an object of Error or a subclass.

      • generateFn: (arg0: Error) => any[]

        A function which is passed the screened error object and returns an internal error code and parameter object.

      • illegalErrorTypeMessage: string = 'Unknown internal error'

        A message to be used for an illegal error type.

      Returns void

      The generated issue.

    • Generate a new Issue object and immediately throw it as an IssueError.

      Parameters

      • internalCode: string

        The internal error code.

      • parameters: {} = {}

        The error string parameters.

      Returns void

      Corresponding to the generated Issue.

    • Generate a new Issue object for an internal error and immediately throw it as an IssueError.

      Parameters

      • message: string = 'Unknown internal error'

        A message describing the internal error. The message should not end with any punctuation.

      Returns void

      Corresponding to the generated internal error Issue.