See the discussion on #2174. An uncaught C++ error on main causes an error like:
```
TypeError: Cannot create property 'pyodide_fatal_error' on number '28811048'
```
With this the same error looks like:
```
Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers.
The cause of the fatal error was:
CppException: Unable to cast Python instance to C++ type (compile in debug mode for details)
```
Support for C++ exceptions in packages. See the discussion on #2174. An uncaught C++ error on main causes an error like:
```
TypeError: Cannot create property 'pyodide_fatal_error' on number '28811048'
```
With this the same error looks like:
```
Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers.
The cause of the fatal error was:
CppException: Unable to cast Python instance to C++ type (compile in debug mode for details)
```
{
  "$schema": "http://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "declaration": true,
    "lib": ["ES2021", "DOM"],
    "outDir": "../../build",
    "rootDir": ".",
    "esModuleInterop": true,
    "target": "ES6",
    "module": "ES2020",
    "moduleResolution": "node",
    "noImplicitAny": true
  },
  "include": ["*.ts"],
  "exclude": ["rollup.config.js", "*test*"]
}

{
  "$schema": "http://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "declaration": true,
    "lib": ["ES2021", "DOM"],
    "outDir": "../../build",
    "rootDir": ".",
    "esModuleInterop": true,
    "target": "ES6",
    "module": "ES2020",
    "moduleResolution": "node",
    "noImplicitAny": true
  },
  "include": ["*.ts"],
  "exclude": ["rollup.config.js", "*test*"]
}
