Exceptions: Getting webassembly Pascal exception info

The wasm.exceptions unit in FPC exposes 2 functions which allow you to retrieve exception information from the free pascal RTL. You can use this to check if a Webassembly.Exception exception is the result of a Free Pascal exception and retrieve the classname and message from the exception.

The output below shows the result of this.

Created using   pas2js.

Pas2JS Sources:   Pas2JS Program

Webassembly Sources:   FPC Program