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

    Function getErrorMessage

    • The message from an unknown thrown value.

      DOMException (what the File System Access API throws) satisfies instanceof Error per WebIDL, so one branch covers it. Cross-realm and worker Error-like objects use their non-empty message; genuine data objects are serialized so their fields are not collapsed to [object Object].

      Never throws. String(x) raises TypeError: Cannot convert object to primitive value for a null-prototype object, and a hostile message accessor can throw too; this runs inside catch blocks and logging paths — a helper whose job is "make this loggable" must not become the thing that breaks the error handler. Same hazard the debug console's object branch already guards.

      Parameters

      • error: unknown

      Returns string