Nutrient Web SDK

Class Error

A NutrientViewer.Error indicates a problem with NutrientViewer. It is a subclass of and behaves like a regular JavaScript error.

Class
Type Signature
Error(messageOrError?: string | Error): Error

Example

try {
NutrientViewer.someFunctionThatFails()
} catch (error) {
error instanceof NutrientViewer.Error // => true
error.message // Useful error message
}

Hierarchy

Error
  • Static

    Type Declaration

    Parameters

    messageOrErrorstring | Error
    Optional

    Returns

Constructors

  • Parameters

    messageOrErrorstring | Error
    Optional

Properties

cause

Optional
unknown
string
string

stack

Optional
string