WxEc:
    | "Fail"
    | "AddEventListenerFail"
    | "Timeout"
    | "NotWorkerGlobalScope"
    | "NotWindow"
    | "NoOwnerForWindow"
    | "NoOriginForWindow"
    | "InvalidUrl"
    | "ProtocolDisagree"
    | "Closed"
    | "UnknownProtocol"
    | "Catch"
    | "DuplicateProtocol"
    | "InvalidRequestData"
    | "UnknownFunction"
    | "NoReturn"
    | "UnexpectedStubCall"

Workex Error Codes

Type declaration

  • "Fail"

    Generic Failure

  • "AddEventListenerFail"

    Failed to add event listener

  • "Timeout"

    Timeout while waiting for response

  • "NotWorkerGlobalScope"

    Function should only be called when globalThis is WorkerGlobalScope

  • "NotWindow"

    Function should only be called when globalThis is Window

  • "NoOwnerForWindow"

    WxWindow.owner is called on a Window that doesn't have an owner (i.e. not an iframe or popup opened by another window)

  • "NoOriginForWindow"

    When wxWindow cannot read globalThis.location.origin

  • "InvalidUrl"

    Failed to parse URL, for example when opening a popup or parsing src of iframe

  • "ProtocolDisagree"

    If the other end does not agree with the protocols used by this end

  • "Closed"

    If the other end closed unexpectedly

  • "UnknownProtocol"

    If a message received has a protocol not registered on the bus

  • "Catch"

    An error is caught at the bus level in the handler on the other end

  • "DuplicateProtocol"

    If multiple connection of the same protocol are configured on the same bus

  • "InvalidRequestData"

    The data field in a request is invalid

  • "UnknownFunction"

    Calling the other side with a bad function id

  • "NoReturn"

    The handler did not return anything

  • "UnexpectedStubCall"

    The stub handler in a one-direction protocol is being called unexpectedly