VS Code API
    Preparing search index...

    Class LanguageModelError

    An error type for language model specific errors.

    Consumers of language models should check the code property to determine specific failure causes, like if(someError.code === vscode.LanguageModelError.NotFound.name) {...} for the case of referring to an unknown language model. For unspecified errors the cause-property will contain the actual error.

    Hierarchy

    Index

    Constructors

    • Parameters

      • Optionalmessage: string

      Returns LanguageModelError

    • Parameters

      • Optionalmessage: string
      • Optionaloptions: ErrorOptions

      Returns LanguageModelError

    Properties

    cause?: unknown
    code: string

    A code that identifies this error.

    Possible values are names of errors, like NotFound, or Unknown for unspecified errors from the language model itself. In the latter case the cause-property will contain the actual error.

    message: string
    name: string
    stack?: string

    Methods

    • Indicates whether the argument provided is a built-in Error instance or not.

      Parameters

      • error: unknown

      Returns error is Error