On Thursday, October 17, 2013, Igor Bukanov wrote:

>
> Go - I have not used the language, but my general impression is that
> no error will be generated. Instead the file will be read as an empty
> string.
>

Go encodes the error as a value which can be either treated as a string or
programmatically inspected to determine the correct response and returns it
along with an invalid file handle. If the code doesn't actually
specifically handle permission problems, it will usually create a new error
value embedding the original error along with some context about what it
was doing when it got the error. This new error can then be used as a
failure value or passed up the stack, or it may be logged (potentially in
combination with one of the other two options). This means that, even if
the developer didn't anticipate permissions issues, the error will likely
contain all the relevant information, such as what line of the
configuration file was being processed as well as what file failed to open
and why.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to