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
The constructor create creates a file descriptor but does not check for errors, the correct code to check for errors would be:
newcreate(dir: FilePath, file_name: String) =>
_file = File(dir)
if not (_file.errno() is FileOK) thenerrorend
But it is not possible to do so because an actor constructor cannot fail, and actually defeats the purpose of this chapter because the chapter advises to do error handling before constructing an actor.
The text was updated successfully, but these errors were encountered:
A user pointed out that we weren't address the fact that `File` can
fail and that you need to check `errno()` to see if it worked. This
makes the pattern incomplete and misleading.
When I was addressing this, I noticed that when I originally wrote
the pattern, I was trying to write the temp directory without creating
a file in it.
Both issues have been addressed in this update.
Closes#71
A user pointed out that we weren't address the fact that `File` can
fail and that you need to check `errno()` to see if it worked. This
makes the pattern incomplete and misleading.
When I was addressing this, I noticed that when I originally wrote
the pattern, I was trying to write the temp directory without creating
a file in it.
Both issues have been addressed in this update.
Closes#71
* Address correctness issues in Supply Chain pattern
A user pointed out that we weren't address the fact that `File` can
fail and that you need to check `errno()` to see if it worked. This
makes the pattern incomplete and misleading.
When I was addressing this, I noticed that when I originally wrote
the pattern, I was trying to write the temp directory without creating
a file in it.
Both issues have been addressed in this update.
Closes#71
The currently listed solution is:
The constructor
create
creates a file descriptor but does not check for errors, the correct code to check for errors would be:But it is not possible to do so because an actor constructor cannot fail, and actually defeats the purpose of this chapter because the chapter advises to do error handling before constructing an actor.
The text was updated successfully, but these errors were encountered: