TypeTags .WebAssemblyRuntimeError

Overview

The WebAssembly.RuntimeError object is the error type that is thrown whenever WebAssembly specifies a trap.

️🚫

Since error objects do not have unique type tags, a WebAssembly.RuntimeError type tag is the same as any other Error object. If you need to check if an error is an instance of a WebAssembly.RuntimeError, use instanceof instead.

Usage

import { TypeTags } from 'typetags'
try {
throw new WebAssembly.RuntimeError('Hello', 'someFile', 10)
} catch (e) {
console.log(TypeTags.get(e) === TypeTags.WebAssemblyLinkError)
// → true (oops!)
console.log(e instanceof WebAssembly.LinkError)
// → false
}
console.log(TypeTags.WebAssemblyRuntimeError)
// → [object Error]

Metadata (TType)

MetadataValue
.typeWebAssembly.RuntimeError
.tag[object Error]
.builtin()undefined
.getTag()[object Error]
.hasSpecialArgs()false
.instance()undefined
.instanceTypeOf()object
.info()see more
.isAvailable()true
.isConstructor()true
.isFactory()true
.isFunction()true
.isGlobal()false
.isIterator()false
.isNested()true
.isObject()false
.isPrimitive()false
.isStringifiable()true
.isSyntatic()false
.isTypedArray()false
.ownKeys()[length, name, prototype]
.toString()function toString() { [native code] }
.typeOf()function

Signature

declare type ITypeTags = {
[key in Types | NestedTypes]: Tags
}
declare interface Predicate {
predicate(value: any): boolean
}

See MDN Web Docs