ziglua icon indicating copy to clipboard operation
ziglua copied to clipboard

Rename error.Fail to error.LuaError

Open natecraddock opened this issue 2 years ago • 3 comments

Also prefix the other errors with Lua

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

natecraddock avatar Mar 31 '23 15:03 natecraddock

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.

nurpax avatar Jan 10 '24 19:01 nurpax

I agree, reusing the OutOfMemory error would make sense

natecraddock avatar Jan 16 '24 00:01 natecraddock

error.LuaError is a more descriptive than error.Fail

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

VisenDev avatar Apr 26 '24 01:04 VisenDev