Skip to content

Fix error reporting when signature of bound function is not void#102

Merged
jinzhongjia merged 2 commits into
webui-dev:mainfrom
elverskog:main
Jun 30, 2025
Merged

Fix error reporting when signature of bound function is not void#102
jinzhongjia merged 2 commits into
webui-dev:mainfrom
elverskog:main

Conversation

@elverskog
Copy link
Copy Markdown
Contributor

@elverskog elverskog commented Jun 29, 2025

Took a bit to figure out an error related to a bound (win.binding) function, I created, not returning void.
I was trying to return !void, to account for a try in the function.
With the current version I got an error summarized here:

cannot format optional without a specifier (i.e. {?} or {any})
@compileError("cannot format optional without a specifier (i.e. {?} or {any})");
.../src/webui.zig:777:46: note: called from here const err_msg = std.fmt.comptimePrint(

This patch (really created by https://github.com/elpekenin) tries to offer a clearer response, as oppose to an error in the lib.

@jinzhongjia
Copy link
Copy Markdown
Member

Great PR, thank you for your work

@jinzhongjia jinzhongjia merged commit d758717 into webui-dev:main Jun 30, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants