The is()
prototype method of the Exception
object can be used to test if the Exception
matches a given tag.
The method might be used to test that a tag is correct before passing it to Exception.prototype.getArg()
to get the passed values. It can be used on tags created in JavaScript or created in WebAssembly code and exported to JavaScript.
Note: It is not enough that the tag has an identical sequence of data types — it must have the same identity (be the same tag) as was used to create the exception.