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

Set error message in erlang ffi #23

Merged
merged 1 commit into from
Apr 13, 2024
Merged

Set error message in erlang ffi #23

merged 1 commit into from
Apr 13, 2024

Conversation

stickyPiston
Copy link
Contributor

The type of env.get is Result(String, String) but the erlang ffi does not return a string. So I added the same error message the js ffi returns to the erlang ffi. I'm not too familiar with erlang so it might not be as concise as it could be. It would be great if this could get merged, thanks in advance!

and added a test for it that works for both js and erlang
@aosasona
Copy link
Owner

@stickyPiston Great work! Thanks for catching this, in the future, it should ideally return an Option type since I will be supporting Deno, Bun and Node properly (which is the main reason we have a string error at all; to tell users when process.env is not available). The rewrite is slowly coming along but I will merge this and see if it can be improved, I do not know a lot of Erlang myself. Thanks again!

@aosasona aosasona merged commit 000e7ba into aosasona:master Apr 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants