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.

Stubbed

Hierarchy

  • Error
    • LanguageModelError

Constructors

Properties

Methods

Constructors

  • Parameters

    • Optional message: string

    Returns LanguageModelError

Properties

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.

Methods