mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-01 00:22:17 +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 (_) {
|
} catch (_) {
|
||||||
return 'Object';
|
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 val = getObject(i);
|
||||||
const debug = debug_str(val);
|
const debug = debug_str(val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user