this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

lua: improve log for user commands

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>

+8 -1
+1
src/irc.zig
··· 16 16 client: *Client, 17 17 channel: *Channel, 18 18 }; 19 + 19 20 pub const Command = enum { 20 21 RPL_WELCOME, // 001 21 22 RPL_YOURHOST, // 002
+7 -1
src/lua.zig
··· 162 162 _ = lua.pushString(cmdline); // [function, string] 163 163 164 164 switch (lua_type) { 165 - .function => lua.protectedCall(1, 0, 0) catch return error.LuaError, 165 + .function => lua.protectedCall(1, 0, 0) catch |err| { 166 + const msg = lua.toString(-1) catch { 167 + std.log.err("{}", .{err}); 168 + return error.LuaError; 169 + }; 170 + std.log.err("{s}", .{msg}); 171 + }, 166 172 else => lua.raiseErrorStr("not a function", .{}), 167 173 } 168 174 }