Skip to content

Commit eb78b09

Browse files
committed
Prefix error names with Lua
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
1 parent 02ee64d commit eb78b09

File tree

3 files changed

+169
-169
lines changed

3 files changed

+169
-169
lines changed

docs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Here is a list of the features Ziglua uses for greater safety:
4444

4545
### Errors
4646

47-
Many functions now return Zig errors rather than an integer code. The Zig compiler will then ensure that the error is handled, or ignored. There are specific error types like `ziglua.Error.Runtime` for errors that have a specific meaning.
47+
Many functions now return Zig errors rather than an integer code. The Zig compiler will then ensure that the error is handled, or ignored. There are specific error types like `ziglua.error.LuaRuntime` for errors that have a specific meaning.
4848

49-
On the other hand, many functions either succeed or return an error. Rather than returning a boolean success code, these functions return the generic `ziglua.Error.Fail` to indicate failure. The type of failure can be determined in the context of the function called.
49+
On the other hand, many functions either succeed or return an error. Rather than returning a boolean success code, these functions return the generic `ziglua.Error.LuaError` to indicate failure. The type of failure can be determined in the context of the function called.
5050

5151
### Booleans
5252

0 commit comments

Comments
 (0)