mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 14:31:22 +00:00
Merge pull request #1179 from alexcrichton/catch-all-errors
In debug mode log all imported uncaught exceptions
This commit is contained in:
@ -2420,6 +2420,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
// Build up our shim's state, and we'll use that to guide whether we
|
||||
// actually emit an import here or not.
|
||||
let mut shim = Rust2Js::new(self.cx);
|
||||
if shim.cx.config.debug {
|
||||
shim.catch_and_rethrow(true);
|
||||
}
|
||||
shim.catch(import.catch)
|
||||
.variadic(import.variadic)
|
||||
.process(descriptor.unwrap_function())?;
|
||||
|
Reference in New Issue
Block a user