-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propage h5wasm errors to viewer #1570
Comments
Apparently, exception handling is disabled in Emscripten by default. So it might simply be a matter of compiling h5wasm with flag |
By default, the HDF5 library error handler function prints to the error stream for every error. This is what is ending up in the users' console. That error handler function can be overridden, but it would require writing a new error handler function in C, and setting that as the default. There don't seem to be a lot of examples of custom error handler functions. It's possible that the C++ API for for HDF5 has exception handling in it already - but migrating to that API from the C API would also be some work. |
There is a PR brewing for raising exceptions in h5wasm here: usnistgov/h5wasm#68 |
Fantastic!! Thanks for looking into this 💯 |
Opt-in to throwing error handler is available new release https://github.com/usnistgov/h5wasm/releases/tag/v0.7.2 |
Describe the bug
When h5wasm throws an error internally, for instance when reading a compressed dataset without the appropriate plugin, the error appears in the console but is not propagated to the viewer.
For compressed datasets, if we didn't throw our own error when the required compression plugins aren't available, we might not even realise the problem, since the visualization would most likely continue to work. In other cases, like with this bug report that was encountered on myHDF5, the h5wasm error causes the viewer to throw another, completely unrelated error further down the line, which can be confusing.
To Reproduce
apps/demo/src/h5wasm/plugin-utils.ts
(e.g.Zstandard
) and silence the TS error.packages/h5wasm/src/h5wasm-api.ts
(replace with early return).zstd
).Expected behaviour
When h5wasm throws an error, this error should be propagated to the viewer and trigger the visualization area's error boundary.
The text was updated successfully, but these errors were encountered: