Skip to content
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

Throw proper JS errors #75

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Throw proper JS errors #75

merged 1 commit into from
Sep 21, 2020

Conversation

cormacrelf
Copy link
Collaborator

@cormacrelf cormacrelf commented Sep 21, 2020

Fixes #25.

Upgrades roxmltree while we're at it. Minor API change to setStyle(); it now throws rather than returning a perfectly serialized JSON error object.

…fix #25)

This is for the sake of throwing errors that have stack traces, rather
than strings which strip them for JS hosts.

*Slight* API change in that setStyle now throws an error with a message,
rather than returning a perfectly serialized JSON csl::StyleError. But
that's an API for elsewhere; it would be called parseStyle, and it needs
more features than setStyle does.
@cormacrelf cormacrelf changed the title impl std::error:Error in csl; use it to return js_sys::Errors in wasm (fix #25) Throw proper JS errors Sep 21, 2020
@cormacrelf cormacrelf merged commit 108a426 into master Sep 21, 2020
@cormacrelf cormacrelf deleted the js-no-string-errors branch September 21, 2020 17:12
@cormacrelf cormacrelf added A-wasm Area: wasm package on npm enhancement New feature or request A-crates/csl Area: csl crate labels Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-crates/csl Area: csl crate A-wasm Area: wasm package on npm enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Wasm driver throws string errors
1 participant