You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a standard hello world program that I'm using to start learning the language, and I'm trying to introduce an error by redirecting the output to a device that doesn't have any free space:
This (and other similar scenarios) should cause an error, however I see no way to detect it. Looking at the implementation of StdStream.flush() I see this comment:
""" Flush any data out to the os (ignoring failures)."""
This seems like an important gap in the builtin library.
For what it's worth, from a non-Pony developer's perspective, the FileStream error mechanism (requiring a person to check File.errno()) seems less than ideal as well. Maybe that's just a difference in style / preference.
I'd follow the RFP process to suggest a general error mechanism for OutStream, but I'm afraid I don't have the bandwidth for that right now. Apologies.
The text was updated successfully, but these errors were encountered:
I have a standard hello world program that I'm using to start learning the language, and I'm trying to introduce an error by redirecting the output to a device that doesn't have any free space:
./hello-pony > /dev/full
(Inspired by https://blog.sunfishcode.online/bugs-in-hello-world/)
This (and other similar scenarios) should cause an error, however I see no way to detect it. Looking at the implementation of
StdStream.flush()
I see this comment:This seems like an important gap in the builtin library.
For what it's worth, from a non-Pony developer's perspective, the
FileStream
error mechanism (requiring a person to checkFile.errno()
) seems less than ideal as well. Maybe that's just a difference in style / preference.I'd follow the RFP process to suggest a general error mechanism for
OutStream
, but I'm afraid I don't have the bandwidth for that right now. Apologies.The text was updated successfully, but these errors were encountered: