mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 18:20:51 +00:00
Add better support for errors.
This commit is contained in:
parent
5bffc28631
commit
5f2ba3f98e
@ -414,10 +414,13 @@ impl<'a> Context<'a> {
|
||||
} catch (_) {
|
||||
return 'Object';
|
||||
}
|
||||
// TODO we could test for more things here, like `Set`s and `Map`s.
|
||||
} else {
|
||||
return className;
|
||||
}
|
||||
// errors
|
||||
if (val instanceof Error) {
|
||||
return `${className}: ${val.message}\n${val.stack}`;
|
||||
}
|
||||
// TODO we could test for more things here, like `Set`s and `Map`s.
|
||||
return className;
|
||||
};
|
||||
const val = getObject(i);
|
||||
const debug = debug_str(val);
|
||||
|
Loading…
x
Reference in New Issue
Block a user