Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #1570
Thanks to @bmaranville and h5wasm@0.7.2, we can now configure the HDF5 library to throw errors instead of just logging them to the console with
console.error
. This will hopefully help surface bugs much faster (like the one fixed in #1568).Another benefit is that we can now take advantage of the propagated errors when it makes sense, like when a compression plugin is not supported, instead of trying to detect the situation ahead of time.
Summary of changes:
cause
.ErrorFallback
, if an error has a cause, I render adetails
element with apre
containing the cause. This gives access to the original HDF5 error message for debugging purposes.Of course, we might uncover other HDF5 errors that we'll need to handle more specifically; this just provides robust foundations. I'm also planning to wrap other h5wasm calls with try/catch (like when reading attributes) in my next PR.
Filter not registered
With dataset
sz3
infilters.h5
:Fallback error
Same file as above, but after commenting out the detection of filter-related errors.
No more error for
fcidecomp
datasetBefore/after screenshots that show that our attempt at predicting when a filter was not supported was causing false positives: