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)
```
from setuptools import setup, Extension

setup(
    name="fpcast-test",
    version="0.1.1",
    author="Hood Chatham",
    author_email="roberthoodchatham@gmail.com",
    description="Test function pointer casts.",
    long_description_content_type="text/markdown",
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    # packages=["fpcast_test"],
    ext_modules=[Extension("fpcast_test", ["fpcast-test.c"])]
    # python_requires='>=3.6',
)

from setuptools import setup, Extension

setup(
    name="fpcast-test",
    version="0.1.1",
    author="Hood Chatham",
    author_email="roberthoodchatham@gmail.com",
    description="Test function pointer casts.",
    long_description_content_type="text/markdown",
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    # packages=["fpcast_test"],
    ext_modules=[Extension("fpcast_test", ["fpcast-test.c"])]
    # python_requires='>=3.6',
)
