git.s-ol.nu glsl-view / 2044c11
better error messages s-ol 1 year, 10 months ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
44
55 fn verify_args(expected: u8, got: []const u8) !void {
66 for (got) |typ| {
7 if (typ != expected)
7 if (typ != expected) {
8 std.debug.warn("expected '{c}' but got '{c}' element (expected {})\n", .{expected, typ, got});
89 return error.typeMismatch;
10 }
911 }
1012 }
1113
180182 }
181183
182184 self.set_uniform(path[1..], argv, argc, types) catch |err| {
183 std.debug.warn("{}\n", .{err});
185 std.debug.warn("{} while processing {}\n", .{err, path});
184186 };
185187 return 0;
186188 }