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
io::reader's read_* functions need to expose a mechanism to report an underlying OS errors. Perhaps the read functions should return a result<..., ~str> or option<...>?
The text was updated successfully, but these errors were encountered:
@graydon suggested an error handling system a while back that is very similar to LISP's condition system. If we end up adding that, would it be a better way to handle this? IO operations are common enough and errors rare enough that we may not want to have to surround every read with an alt to handle the error. On the other hand, this might encourage programmers to make more robust software.
I've got a WIP on the new I/O system that overhauls error handling. It will use conditions in combination with 'nullable' return values (Option, empty vectors, sentinel values) and some clever trait implementations to hopefully provide an interface that isn't obnoxious to use while also providing error information and recoverability when it is desired. I'll have more details on the mailing list soon.
io::reader
'sread_*
functions need to expose a mechanism to report an underlying OS errors. Perhaps theread
functions should return aresult<..., ~str>
oroption<...>
?The text was updated successfully, but these errors were encountered: