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

Rename error.Fail to error.LuaError #16

Closed
Tracked by #32
natecraddock opened this issue Mar 31, 2023 · 3 comments
Closed
Tracked by #32

Rename error.Fail to error.LuaError #16

natecraddock opened this issue Mar 31, 2023 · 3 comments

Comments

@natecraddock
Copy link
Owner

Also prefix the other errors with Lua

Not sure yet, but it seems that would be a good way to namespace things?

@natecraddock natecraddock mentioned this issue Dec 29, 2023
10 tasks
@nurpax
Copy link
Contributor

nurpax commented Jan 10, 2024

Just throwing this out here, I'm not sure I know what is the right answer to this.

But would it make sense to return std.mem.Allocator.Error.OutOfMemory directly from std.mem.Allocator failures instead of translating to error.Memory? I don't have a motivating example case for this, but it feels like it might harmonize error handling code if Ziglua doesn't define another error for OOM.

@natecraddock
Copy link
Owner Author

I agree, reusing the OutOfMemory error would make sense

@VisenDev
Copy link
Contributor

error.LuaError is a more descriptive than error.Fail

Just getting "error: fail" can be a little annoying

natecraddock added a commit that referenced this issue Oct 12, 2024
Renames all errors to be prefixed with Lua as a sort of namespacing.

error.Memory is renamed to error.OutOfMemory to match the Zig errors

Closes #16
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

No branches or pull requests

3 participants