Noreturn vs error{Usage}!noreturn
Ziggit
Noreturn vs error{Usage}!noreturn
I don’t understand how I should be specifying the return type of this function: fn usageErrorExit( options: ParseOptions, comptime format: []const u8, args: anytype, ) error{Usage} { if (options.render_usage_errors) { std.log.err(format, args); std.log.err("Provide only --help for help.", .{}); } if (options.exit_usage_error) std.process.exit(1); return error.Usage; } Should I be using error{Usage}!noreturn or just error{Usage} and why? When I do u...
0 comments
No comments yet.