-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: unhandled exception: errno: 9 `Bad file descriptor' [IOError] #16502
Comments
Workaround: |
see #16367 |
#16367 was still correct to raise; template myEcho(args: varargs[untyped]): untyped =
# adapt if needed so echo still renders at CT using `when nimvm`
when appType == "gui": discard
else: echo(args) (or, if it's meaningful to support, |
IMO the change should be reverted, what worth is it raising if you can't display the exception (on platforms where we don't have this messagebox)? |
no It is easy to fix. Just adding echo 1 In windows, I got a messagebox and I can catch this exception. Note that |
I am using latest cloned&built nim
Example
Current Output
when I compile the
a.nim
withnim c -r --app:gui a.nim
, I get an error msgboxwhen I compile
a.nim
asnim c -r a.nim
, I seeas expected
Expected Output
yes, I know
--app:gui
means to compile aGUI
app without console, so I expectnim c -r --app:gui a.nim
runs but without error msgbox. Why do I need this? Because I write someecho xx
in my app which are used for debugging. When the app is finished, I need to release a GUI app to the user without console, but I am lazy to remove theecho xx
statements.thanks
The text was updated successfully, but these errors were encountered: