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

Fix JavaScript error messages using reason field instead of message #160

Merged
merged 5 commits into from
Apr 13, 2023

Conversation

pvditto
Copy link
Contributor

@pvditto pvditto commented Apr 6, 2023

No description provided.

.gitignore Show resolved Hide resolved
@pvditto
Copy link
Contributor Author

pvditto commented Apr 6, 2023

I ran into a wall when the removed new and from_status methods broke derive_ReprC. Can you give me a hint how to continue? @danielhenrymantilla

error[E0599]: no function or associated item named `new` found for struct `safer_ffi::js::Error` in the current scope
   --> src/lib.rs:252:1
    |
252 | #[derive_ReprC(js)]
    | ^^^^^^^^^^^^^^^^^^^ function or associated item not found in `safer_ffi::js::Error`

@danielhenrymantilla
Copy link
Collaborator

Yeah, removing Error::new() is ending up to be more disruptive than anticipated; if our code does not rely on the Status in and of itself provided in the new() constructor then we may just ignore it on wasm, and let the safer-ffi-generated code still provide a Status to node.js code, I think

@danielhenrymantilla danielhenrymantilla added the K-bug Kind: existing code isn’t behaving as expected label Apr 7, 2023
Copy link
Collaborator

@danielhenrymantilla danielhenrymantilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! ✅

@danielhenrymantilla danielhenrymantilla marked this pull request as ready for review April 13, 2023 10:55
@danielhenrymantilla danielhenrymantilla enabled auto-merge (squash) April 13, 2023 10:55
@danielhenrymantilla danielhenrymantilla merged commit 257eb0b into master Apr 13, 2023
@danielhenrymantilla danielhenrymantilla deleted the pv/error-message-fix branch April 13, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
K-bug Kind: existing code isn’t behaving as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants