Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function getErrorStack

    • The stack from an unknown thrown value, or undefined when there isn't one.

      The duck-typed branch is deliberate: some Firefox DOMExceptions carry a stack without being reported as an Error, and a thrown plain object may carry one too.

      Never throws. stack can be a throwing accessor and 'stack' in x can hit a throwing Proxy trap — and this runs inside the patched console.warn / console.error BEFORE the original console call, so a throw here would swallow the very diagnostic being logged and break the calling code.

      Parameters

      • error: unknown

      Returns string | undefined